kingpin,
You can do this pretty easily with a command instead of using the snmp poller.
First, create a small script file to do the snmp poll for you. As an example, I
made one that counts how many active calls I have on a voice gateway like
this...
>
> #!/bin/bash
> community=$1
> host=$2
> oid=$3
> echo -n "0:OK|calls="
> snmpwalk -c$community -v1 $host $oid 2>/dev/null | wc -l
>
The echo -n "0:OK|calls=" line is important. For more information, look up how
to write a Nagios Plugin. But for now, the name that comes after the OK| is the
name of the datasource we will use for later. Obviously, replace this with
whatever name you want, like aps= or something similar.
Save this file in $ZENHOME/libexec/
Now, create a new template for your device, and add a DataSource but set the
DataSouce type to Command instead of SNMP.
Configure the data source Command Template to call the script above like this:
script_name public ${dev/manageIp} 1.3.6.1.4.1.9.9.63.1.3.1.1.1
again, replace public with your community string, and the OID with whatever OID
you need.
Finally, add a Data Point. The Data Point name MUST match the name you entered
in the echo -n "0:OK|xxxx= line as that is the variable name that will be
passed.
You can add error checking and such if you want, the Nagios Plugin framework
allows for certain return values other than just the 0:OK, I just simplified
this for here.
Add a graph to your template, then apply the template to your device and you
should start getting a graph of the amount of APs after a couple of polling
cycles.
Good luck,
Dave
-------------------- m2f --------------------
Read this topic online here:
http://forums.zenoss.com/viewtopic.php?p=31044#31044
-------------------- m2f --------------------
_______________________________________________
zenoss-users mailing list
[email protected]
http://lists.zenoss.org/mailman/listinfo/zenoss-users