SNMP Monitoring conundrum

Jon Angliss jon at netdork.net
Fri Jul 17 03:59:07 CEST 2009


On Thu, 16 Jul 2009 13:50:50 -0800, Israel Brewster
<israel at frontierflying.com> wrote:

>I have a number of scripts I have developed to monitor our UPS units  
>via SNMP - I found the included plugins didn't give me enough power/ 
>flexibility with the monitoring, so I made my own. Unfortunately, we  
>have just added a new UPS to the system which, although made by the  
>same company, uses different OID's for the data I am pulling. Thus the  
>issue: I want the same data, so other than the OID's the existing  
>scripts would work. But how do I deal with different OID's on  
>different devices?
>
>So far I've thought of the following:
>1) Make a second copy of my scripts with the new OID's. Also implies  
>creating new contacts to use the new script (the notification script  
>pulls data such as estimated run time via snmp) and maintaining two  
>copies of each check/notification script

Why 2 copies?  Why not add a version argument to your script?

./check_ups -v 1 {other args}

Inside the script (pseudo code)...

if (version 1) {
  oid_battery_life = 1.2.3.4
} else {
  oid_battery_life = 1.3.3.4
}

snmpget oid_battery_life...

-- 
Jonathan Angliss
<jon at netdork.net>


------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list