forums.meulie.net

NagiosGrapher graphing output of check_snmp

I’m setting up nagios in my dept. The guy who works on the swtiches asked if I could graph the routing and switch cpu 5 sec cpu usage on our main switch. I’ve gotten check_snmp to return the values I’m interested in, but I can’t get nagiosgrapher to graph both values. The log file shows that it is grabbing the first value and it does graph that value. From looking at some of the .ncfg files that come with nagiosgrapher, I think I should be able to display both values on one graph. If someone could give me a pointer in the right direction (or tell me I can’t do what I want), I would be grateful. My check_snmp command is:

check_snmp -P2c -t 10 -H $HOSTADDRESS$ -o 1.3.6.1.4.1.9.9.109.1.1.1.1.6.1,1.3.6.1.4.1.9.9.109.1.1.1.1.6.2 -C xxx -w $ARG1$ -c $ARG2$

Log file show:
2011-03-09 10:14:23 PIPE: gateway switch_cpu SNMP OK - 2 8 iso.3.6.1.4.1.9.9.109.1.1.1.1.6.1=2 iso.3.6.1.4.1.9.9.109.1.1.1.1.6.2=8
2011-03-09 10:14:23 VALUES: [gateway][switch_cpu]: CPU=2

My .ncfg file looks like:

define ngraph {
service_name switch cpu
graph_log_regex .1=(\d+)
graph_value 5sec
graph_units percent
graph_legend routing processor 5 seconds
rrd_plottype LINE1
rrd_color FF0000
}

define ngraph {
service_name switch cpu
graph_log_regex .2=(\d+)
graph_value 5sec
graph_units percent
graph_legend switching processor 5 seconds
rrd_plottype LINE1
rrd_color EACC00
}