snmptrapd not sending complete trap to default

Peter Davidse <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
I try to use snmptrapd to handle traps for various purposes but it does 
not work properly.
I can see the traps in /var/log/messages but not in the trap destination 
defined in snmptrapd.conf.

I have setup a test script in php to write all parameters to a log file.
When a trap comes in the php script is called and a line is added to the 
log file but the trap info is not passed.
A test with a shell script based on snmptt and nagios docs also does not 
work.

Tips to a solution are welcome.

Thanks.

Code :

[snmptrapd.conf]

disableAuthorization yes
traphandle default /tmp/trap.php


[trap.php]

#!/usr/bin/php -q
<?php

$var = serialize($_SERVER['argv']);
$var .= "\n";

// Open the file and erase the contents if any
$fp = fopen('/tmp/snmptrapd.log', "a");

// Write the data to the file
fwrite($fp,$var);

// Close the file
fclose($fp);

?>



-- 



Peter Davidse
IT-Konsulent / Elverum
Høgskolen i Hedmark





-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.