2009/8/10 Rajiv Garg <[email protected]>:
>   I have previously used a commercial SNMP agent that had the ability
> to send periodic heartbeats

> I got nothing thus far for the hearbeat traps.

See the example module "agent/mibgroup/example/notification.c"
That sends precisely such a heartbeat trap.
   (Every 30s, but you can easily adjust the frequency in the 'init' routine)


> and as well as periodic traps for certain events
> like low diskspace and low free swap space.

The Net-SNMP support for such monitoring uses the DisMan Event MIB,
which works on a "trigger/reset" model.   It's not designed to send repeated
traps for a single condition.


>  I would like to change this to have it send [the low disk space trap] every
> hour until the issue clears.  I'm guessing this would require using the
> 'repeat' directive to reset the error flag periodically, but am unsure.

That's not really how the Event MIB (or "monitor" directive) works.
The simplest approach would actually be to code this yourself,
using the example/notification module as a template.
   Register a repeating alarm to call a routine that would retrieve
the value(s) you are interested in (using 'netsnmp_query_get()'
or 'netsnmp_query_walk()'),  check the values against the relevant
threshold(s), and invoke a version of 'send_example_notification()'
if appropriate.

Dave

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
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

Reply via email to