Re: How can I define my own trap?

Ignasi Paredes Oliva <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
Hello,

I finally solved my problem! I would like to thank everybody of this mailing
list for the quick and useful answers provided. They really helped me to
understand all the snmp traps stuff.

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?

Thanks again.
Ignasi

2009/1/27 Dave Shield <[email protected]>

> 2009/1/26 Ignasi Paredes Oliva <[email protected]>:
> > Now, my problem is that I want to define my own trap and I don't now
> > how to do it. First, I want to retrieve some information of my mysql
> > database and after that I would like to create a trap containing all
> > that information (several numbers and strings) and, of course, send
> > it. How should I do that? Should I create a new MIB file?
>
> Yes.
> *All* SNMP information is defined by the relevant MIB file(s).
> That file is used to explain:
>     - the type of any given piece of information
>           and what values it can take
>     - how to refer to it (by OID and name)
>     - the *meaning* of this information
>
> All of this needs to be layed out in advance, before you start
> to implement anything.
>
> I would also suggest that you think in terms of supporting
> these objects for snmpget/snmpwalk requests as well - not
> just for sending traps.   That will also help clarify the structure
> of this information - what values naturally fall into table, how
> those tables are structured and indexed, etc.
>  As well as making the MIB much more useful in general.
>
>
> Fernández Piñas, David <[email protected]> wrote:
> > Another option is to define the MIB tree under experimental node
> > for testing and then move to an official node.
>
> Please do *not* define objects under the experimental node.
> This subtree is controlled by IANA, and they will allocate numbers
> under this tree.  It's not intended for individual private use.
>
> For private experimentation, I'd suggest you use
> NET-SNMP-MIB::netSnmpPlaypen  (.1.3.6.1.4.18072.9999.9999)
> which is specifically intended for this purpose.
>
> 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
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.