On 22 Jun 2011 at 9:10, Dave Shield wrote:
> On 22 June 2011 08:50, Giuseppe Modugno <[email protected]> wrote:
> > I'm defining a MIB for a custom electronic equipment. I already extended the
> > Net-SNMP agent with success for GET and SET requests.
> > Now I want to send notifications messages in case of any alarm.
> 
> First question - do you actually need to define your own notification?
> The Net-SNMP agent supports the DisMan Event MIB,
> which would allow you to monitor these values, and automatically
> trigger a notification if the value strays outside a defined range.
> 
> Have a look at the "DisMan Event MIB" section of the snmpd.conf man
> page for details.

I think DisMan Event MIB has the purpose to allow the user to 
completely customize the OIDs to monitor and the conditional 
expressions that trigger notifications.

In my case, I don't want to give the user this flexibility. The user 
doesn't necessarily know how to calibrate the thresholds of every 
voltages. Most probably he doesn't know that he needs to monitor 
this signals, but it's important for me to inform the user in case 
of alarm, so he can be warned that something strange happened on the 
machine.

Moreover the conditional expressions are very complex so the 
facility of DisMan Event would be too limiting.


> > I'm wondering what is the best approach between creating 10 different
> > notifications with own OID (oidNotifV1Alarm, oidNotifV2Alarm, ...) or
> > creating just one notification (oidNotifVAlarm).
> 
> One notification with an explanatory payload would be better.
> Yes - this is a perfectly valid (and common) approach - see the
> other notification definitions for similar examples.

I tried to look at notifications defined in standard MIBs, but I 
couldn't understand how to solve my particular case.

I have the following objects defined in myMIB:

myV1 OBJECT-TYPE
        SYNTAX          Integer32
        UNITS                   "V"
        MAX-ACCESS              read-only
        STATUS          current
        DESCRIPTION             "First voltage"
        ::= { myMIB 1 }

myV2 OBJECT-TYPE
        SYNTAX          Integer32
        UNITS                   "V"
        MAX-ACCESS              read-only
        STATUS          current
        DESCRIPTION             "Second voltage"
        ::= { myMIB 2 }

...and so on.

How should I define one notification that includes the correct 
informations about the object that triggered the alarm and its 
value? What should I write in OBJECTS field?

myVoltageAlarm NOTIFICATION-TYPE
    OBJECTS { ??? }
    STATUS  current
    DESCRIPTION
        "Notification that the rising threshold was met for triggers
        with mteTriggerType 'threshold'."
    ::= { myNotifications 1 }

Thank you for your support.

------------------------------------------------------------------------------
Simplify data backup and recovery for your virtual environment with vRanger.
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Data protection magic?
Nope - It's vRanger. Get your free trial download today.
http://p.sf.net/sfu/quest-sfdev2dev
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to