It didn't work for me either. I ended up using the command line -F switch. The log options didn't work either in the file, I had to use -Lf. This is version 5.4.1. Some other options in the file (like turning of authorization) did work. But not the format1, format2 or log options.
I also didn't find a way to differentiate between logging the traps and the internal error messages. That would be nice to have (ie, send internal error messages to one file, traps to another). John > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:net-snmp- > [EMAIL PROTECTED] On Behalf Of Friedrich Clausen > Sent: Thursday, December 06, 2007 9:32 AM > To: [email protected] > Subject: Formatting of snmptrapd received traps in log file. > > Hello All, > > Snmptrapd does not seem to be respecting the format1 and format2 lines > that I have inserted into /etc/snmp/snmptrapd.conf. Some info: > > Net-SNMP versions tried - 5.4.1 and 5.2.3 (5.2.3 being Debian Etch > default) > OS - Debian Etch (4.0) > snmptrapd arguments - > > /usr/sbin/snmptrapd -p /var/run/snmptrapd.pid -M /usr/share/snmp/mibs - > C -c\ > /etc/snmp/snmptrapd.conf > > Contents of snmptrapd.conf: > > # start snmptrapd.conf > logOption f /var/log/snmptraps.log > format1 Trap from %B > format2 Trap from %B > > authCommunity log,execute,net the_community > # end snmptrapd.conf > > Basically, snmptrapd is logging using the seemingly default format. > For, example, here is a trap received when restart snmpd on a server: > > 10.31.5.44: Cold Start Trap (0) Uptime: 0:00:00.06 > server.example.com [UDP: [10.31.0.123]:47185]: Trap , > DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (6) 0:00:00.06, > SNMPv2-MIB::snmpTrapOID.0 = OID: SNMPv2-MIB::coldStart, > SNMPv2-MIB::snmpTrapEnterprise.0 = OID: > NET-SNMP-MIB::netSnmpAgentOIDs.10 > > But what I would expect to see given the config file is: > > Trap from server.example.com > > I am unsure as to how to get it to log in the desired format. Any > assistance would be much appreciated. > > Regards, > > Fred. > > ----------------------------------------------------------------------- > -- > SF.Net email is sponsored by: The Future of Linux Business White Paper > from Novell. From the desktop to the data center, Linux is going > mainstream. Let it simplify your IT future. > http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 > _______________________________________________ > 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 ------------------------------------------------------------------------- SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 _______________________________________________ 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
