Re: How can I define my own trap?
Ignasi Paredes Oliva <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <[email protected]> |
Ok, thanks Niko, I'll try it. Dave, I made the modifications that you suggested. I changed the initial character of all objects of the trap to be lower-case and I specified the fullOID name when calling snmtrap. I also changed all the STRING definitions to OCTET STRING (did you mean OCTET STRING insead of OBJECT STRING, didn't you?). The command now is the following: snmptrap -v 2c -c public 127.0.0.1 "" TESTING-TRAP-NOTIFICATION::trapTEST TESTING-TRAP-NOTIFICATION::trapTEST.time s "19:55:67" It doesn't complain anymore about the time format, so I think it's over! I think that the main problem that I had were the badly defined string types.. right? Ignasi 2009/2/2 Nikos Balkanas <[email protected]> > Maybe you should consider using smilint. It proofreads your MIB syntax. > > BR, > Nikos > ----- Original Message ----- From: "Dave Shield" < > [email protected]> > To: "Ignasi Paredes Oliva" <[email protected]> > Cc: <[email protected]> > Sent: Monday, February 02, 2009 2:42 PM > Subject: Re: How can I define my own trap? > > > 2009/2/2 Ignasi Paredes Oliva <[email protected]>: >> >>> Definition: >>> Time OBJECT-TYPE >>> SYNTAX STRING >>> >> >> That doesn't look like a valid definition. >> The SMI syntax is "OBJECT STRING", not "STRING". >> >> So unless you've got a private TC definition, >> that may well be confusing the MIB parser. >> >> (And MIB object names must start with a lower-case letter, >> so the name isn't strictly valid either) >> >> >> >> Command: (omitting all the other attributes of the trap) >>> snmptrap -v 2c -c public 127.0.0.1 "" TESTING-TRAP-NOTIFICATION::trapTEST >>> Time s "19:55:67" >>> >> >> Try using the MIB-qualified name - i.e. MY-MIB::Time >> Or with a fully-numeric OID instead. >> >> Dave >> >> >> ------------------------------------------------------------------------------ >> This SF.net email is sponsored by: >> SourcForge Community >> SourceForge wants to tell your story. >> http://p.sf.net/sfu/sf-spreadtheword >> _______________________________________________ >> 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 >> > > ------------------------------------------------------------------------------ This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword _______________________________________________ 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