[Nagiosplug-help] check_snmp_netint output help
ryamry at kimberly.k12.wi.us
Mon Feb 4 20:10:02 CET 2008
In response to my question, the creator of the check_snmp_netint plugin responded and fixed my issues. Here is his response:
check_snmp_netint uses previous performance data from nagios (which is feed back to plugin with $SERVEPERFDATA$ macro) to calculate traffic on the interface. As a result same command as used in nagios's commands.cfg will not work when doing the check
manually from unix shell prompt (since it is NAGIOS run-time macro). For manual check you need to run the script first (as you did) and then 2nd time in about 5 minutes replacing "$SERVICEPERDATA$ with what you see from that 1st run after |, i.e.
check_snmp_netint_21.pl -H <ipaddy> -C <comm_name> -n GigabitEthernet1/1 -r -feSy -kq -M -w 0,0,0,0,0,0 -c 0,0,0,0,0,0 -P "'GigabitEthernet1/1_in_octet'=777866922c 'GigabitEthernet1/1_out_octet'=1038766082c 'GigabitEthernet1/1_in_error'=0c
'GigabitEthernet1/1_out_discard'=0c 'GigabitEthernet1/1_speed_bps'=1000000000 ptime=1201886717"
(don't just try the above, it will not work now as first check was too long before second)
You should also set proper values for --delta and possibly --pcount as appropriate for your environment. Generally I recommend just trying plugin in nagios, looking at results (from nagios interface) and then if it does not work playing around with
--delta. It should be set to about 2x the time between subsequent checks nagios schedules.
Also you're not using main plugin feature (caching of interface index) that results in considerable speed improvement. To use that add '-m' or '-mm' to your call of this plugin. Other parameter you may want to add is '--cisco' (possibly as
'--cisco=show_portnames') that is if your device is a cisco switch (looks like it to me from interface naming).
Also you did not specify previous time plugin run with -T i.e. for nagios commands.cfg it should be -T $LASTSERVICECHECK$ (I actually don't remember if it still required or an option now, the plugin's latest code reports this data in performance as
ptime so its no longer really needed to be feed back as a MACRO). And do read top portion of the plugin that contains documentation, what I wrote is already explained there and it even has an example of how to configure plugin with cisco switch.
You maybe missing " " around $SERVICEPERFDATA$ - without it nagios would expand it into multiple words.
"Rob Yamry" <ryamry at kimberly.k12.wi.us> writes:
>Hey everyone. Im tring to move my switch port checks to check_snmp_netint. I can get it to do the check, but the output is not what Im looking for. For example, if I run:
>check_snmp_netint_21.pl -H <ipaddy> -C <comm_name> -n GigabitEthernet1/1 -r -feSy -kq -M -w 0,0,0,0,0,0 -c 0,0,0,0,0,0 -P "$SERVICEPERFDATA$"
>Then I will get the following output:
>GigabitEthernet1/1:UP (no usable data - 0 rows) :(1 UP): OK | 'GigabitEthernet1/1_in_octet'=777866922c 'GigabitEthernet1/1_out_octet'=1038766082c 'GigabitEthernet1/1_in_error'=0c 'GigabitEthernet1/1_in_discard'=0c 'GigabitEthernet1/1_out_error'=0c
>'GigabitEthernet1/1_out_discard'=0c 'GigabitEthernet1/1_speed_bps'=1000000000 ptime=1201886717
>What I really want to see, is some output that is in the script under the examples. Something like this:
>eth1:UP (in=14.4Kbps/out=6.2Kbps): OK
>How can I get it so I get the output that I want?
>This SF.net email is sponsored by: Microsoft
>Defy all challenges. Microsoft(R) Visual Studio 2008.
>Nagiosplug-help mailing list
>Nagiosplug-help at lists.sourceforge.net
>::: Please include plugins version (-v) and OS when reporting any issue.
>::: Messages without supporting info will risk being sent to /dev/null
Kimberly Area School District
Phone: 920.788.7905 x 2019
ryamry at kimberly.k12.wi.us
"Pain is temporary. Quitting is forever." - Lance Armstrong
More information about the Help