snmptrapd log file
Hi,
I am trying to run the snmptrapd to capture and log any traps sent to my machine. When I run it using this command: snmptrapd -o /home/herry/test.log Everytime I sent the trap to my machine I get the following lline on the test.log file: 2003-11-13 14:53:21 ECServer [127.0.0.1] (via 127.0.0.1) TRAP, SNMP v1, community public UCD-SNMP-MIB::ucdExperimental.990 Enterprise Specific Trap (17) Uptime: 1:44:44.99 So the snmptrapd logs it fine, however when I try to format the log messages to something simpler and run the snmptrapd with the following command: snmptrapd -o /home/herry/test.log -F "%02.2h:%02.2j" I don't get nothing at all on my test.log file. I know that the formatting was correct since if I run the snmptrapd using only the following command: snmptrapd -P -F "%02.2h:%02.2j" which makes the snmptrapd printing out the formatted message to stderr (which is the terminal), I get the correct format (which happen only to print out the time the trap was received). What I don't understand is why it doesn't seem to be able to send the formatted log to the file. Am I missing something here ? Any one can help ? I am using RH 9 based linux and snmp software from RPM version 5.0.6-17. ( I installed both the net-snmp and net-snmp-utils rpm) Thanks a bunch |
Re: snmptrapd log file
Quote:
Try a more recent version (5.1.1). If it still doesn't work, report a bug at http://www.net-snmp.org/bugs/ |
Can you please share the snmptrapd.conf file here with me?
|
Quote:
|
Quote:
|
Quote:
|
Quote:
|
You can use -t option with snmptrapd
snmptrapd -tLf /your-log-location/yourlogfile.log
Restarted snmptrapd. This worked on RHEL 6.8 net-snmp-5.5-57.el6 |
All times are GMT -5. The time now is 11:05 PM. |