Re: traps - I don't get it

"Dave Shield" <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
    [ First - *please* don't mail me privately, without copying
   any responses to the mailing list.  I don't have the time
   or inclination to offer private, unpaid, SNMP consultancy.
   Keep discussions to the list, where others can both learn
   and offer advice.  Thanks.   ]

On 27/10/06, Pilt <[email protected]> wrote:
> I see, but what if I need to send my own traps, defined in my enterprise mib?
> Do I have to have snmpd compiled with disman module

That's one possibility, certainly.
You wouldn't even need to write any new code whatsoever - just configure
suitable "monitor" directive(s), to watch the appropriate values in your MIB.

But the strict answer to your question:

> Do I have to have snmpd compiled with disman module to use the alarm
> mechanism

is no - you don't *have* to use the DisMan Event module to do this.
It would be perfectly possible to register your own "snmp_alarm" calls
to check the relevant conditions, and generate a trap accordingly.



> And are there any examples of sending traps from subagents?

Subagent or main agent - makes no difference.  The same API is used
in both cases (see the FAQ).  And the mib2c.notify.conf template will
generate a suitable routine for sending a given trap.
   All you'd have to do is fill in the appropriate values for the payload
varbinds, and decide when to call this routine.  (i.e. the "snmp_alarm"
trigger routine mentioned above).

I don't think there are any specific examples in the Net-SNMP code.
The closest would be the link{Up,Down} notifications, but I have a
feeling that this uses the DisMan Event MIB framework.
   (But I could be wrong - I haven't checked)


Dave

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
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.