Re: How can I define my own trap?
Ignasi Paredes Oliva <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <[email protected]> |
*Definition:*
Time OBJECT-TYPE
SYNTAX STRING
MAX-ACCESS accessible-for-notify
STATUS current
DESCRIPTION
"Explanation"
::= { arrel 7 }
*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"
I'm invoking this command from a perl script using the "system" function.
For now, in order to make it work, I've deleted all the ":", thus obtaining
the time as an integer (hhmmss instead of hh:mm:ss). I then redefined the
MIB object definition from STRING to INTEGER.
Ignasi
2009/1/30 Dave Shield <[email protected]>
> 2009/1/29 Ignasi Paredes Oliva <[email protected]>:
> > I only have one last simple question. One of the attributes that I
> extract
> > from the database (the time) has the following format: "19:55:57". I
> defined
> > it as STRING on my MIB tree but when I execute snmptrap command, it
> > complains:
> >
> > Time: Bad variable type (Type of attribute is INTEGER, not OCTET STRING)
> >
> > Do you have any idea of what format should I use?
>
> What is the MIB definition for this object. (Suitably sanitised if
> necessary)
> What is the code or command that you are using to add this value to the
> trap?
>
> 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