Quantcast
Channel: Zenoss Community: Message List
Viewing all articles
Browse latest Browse all 1097

Re: Redhat extend MIB getting the information into zenoss

$
0
0

Well if the data you are getting is from Extending the Red Hat MIB, then you should have control over the script.  If the script returns a string that can only have a list of possible values, you can instead return a numerical index.  Many systems do this, where they will return for example a status number from 0 to 3, where 0 is ok, 1 is warning, 2 is critical, and 3 is unknown.

 

Also you can do a command script that will query your Extended OID and do whatever logic is needed.

 

I.E.

 

#!/bin/bash

 

TheVer=$1

TheCom=$2

TheIP=$3

TheOID=$4

 

TheCheck =`snmpget -"$TheVer" -c"$TheCom" "$TheIP" "$TheOID" | awk -F 'STRING: ' '{print $2}' | sed 's/"//g'`

 

the call would look like this in a command template:

 

<your scritp here> ${dev/zSnmpVer} ${dev/zSnmpCommunity} ${dev/manageIp} .1.3.6.x.x.x.x.x.x <- your OID

 

* $TheCheck now holds your string value, the rest of your script can do any logic you need, then return the result in nagios format.

 

Manuel


Viewing all articles
Browse latest Browse all 1097

Trending Articles