On 2 August 2010 10:22, Guerrero, Simon (PTS horizontal PS projects)
<[email protected]> wrote:
>
> So basically, all I want to do is use the “snmptrap” tool to send an error
> message to that product.
>
> However, I’m confused by all these different MIBS, and what to use
If you need to send your own private error message, then (unless this
is reporting an event which is already covered) you probably need to
define a trap to represent this. That means writing a MIB to define
the Notification object for the trap.
The clean way to do this would be to apply for your own enterprise
number from IANA, and then define your MIB within this subtree.
But if you don't want to bother weith this (and your traps will *only*
ever be used within your organisation), then there's an area of the
Net-SNMP OID subtree that you can use.
See NET-SNMP-MIB::netSnmpPlaypen
(.1.3.6.1.4.1.8072.9999.9999)
The only other advice I'd give is to follow the structure of the
Net-SNMP notifications:
netSnmpNotificationPrefix OBJECT IDENTIFIER ::= {netSnmp 4}
netSnmpNotifications OBJECT IDENTIFIER ::=
{netSnmpNotificationPrefix 0}
nsNotifyStart NOTIFICATION-TYPE ... ::= { netSnmpNotifications 1 }
etc
i.e. have an object with the subidentifier '0' as the parent of the
trap definitions
themselves. That will help if you are likely to use SNMPv1.
> In fact, [the tutorials] don’t seem to even tell you where the MIB files are
That's because we don't know where the MIB files will be.
If you've installed from source, then they'll probably be in one place
(/usr/local/share/mibs), unless you've configured the software to put
them somewhere different.
If you've installed a vendor-provided version, then they'll be
somewhere else.
> (I found them under /usr/share). :-/
That's probably a vendor-supplied installation then.
But not all vendors will put the MIBs there, and we have no control over this.
Hence we cannot give a categorical location for these files.
There is some advice in the FAQ entry
Where should I put my MIB files?
(You *have* read the FAQ, haven't you?)
Dave
------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
_______________________________________________
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