check_win_net_usage
-
download from here
-
requirements
-
check_nt plugin
-
nsclient++ installed on windows host
-
set variable
pluginlocation
to nagios plugin path/usr/lib/nagios/plugins
-
-
usage
$ ./check_win_net_usage.sh -H node1 -p 5666 -i "Realtek PCIe GBE Family Controller" -o KB
-
definition of the parameters
-
-H
hostname of windows server to check -
-p
listening port of nsclient++ on windows server -
-s
password in case nsclient++ was defined to use a password -
-i
name of network interface to use (not ethX
check windows performance gui) -
-o
choose output of value in KB, MB (default Byte)
-
-
command definition in
commands.cfg
-
output in Bytes/s
$ sudo pico /usr/local/nagios/etc/objects/commands.cfg ... define command { command_name check_win_net_usage command_line $USER1$/check_win_net_usage.sh -H $HOSTADDRESS$ -i $ARG1$ $ARG2$ }
-
output in Bytes/s
$ sudo pico /usr/local/nagios/etc/objects/commands.cfg ... define command { command_name check_win_net_usage command_line $USER1$/check_win_net_usage.sh -H $HOSTADDRESS$ -i $ARG1$ -o KB $ARG2$ }
-
-
service checks
-
edit
node1.cfg
$ sudo pico /usr/local/nagios/servers/node1.cfg ... # check windows network define service { use generic-service hostname node1 service_description network usage check_command check_win_net_usage!"Realtek PCIe GBE Family Controller" }
-
edit
node1.cfg
useport
$ sudo pico /usr/local/nagios/servers/node1.cfg ... # check windows network define service { use generic-service hostname node1 service_description network usage check_command check_win_net_usage!"Realtek PCIe GBE Family Controller"!-p 5666 }
-
edit
node1.cfg
useport, password, format
$ sudo pico /usr/local/nagios/servers/node1.cfg ... # check windows network define service { use generic-service hostname node1 service_description network usage check_command check_win_net_usage!"Realtek PCIe GBE Family Controller"!-p 5666 -s passwd -o MB }
-
-
nagiosgraph
map
entry$ sudo pico /usr/local/nagiosgraph/etc/map ... # service type: check_win_net_usage # Regex by Claudio Kuenzler # Nagios Output: Network OK - 9 KBytes received/sec, 0 KBytes sent/sec # Perfdata: bytes_in=9988;bytes_out=367 /perfdata:bytes_in=(\d+);bytes_out=(\d+)/ and push @s, [nt_net, ['in_Bps', GAUGE, $1 ], ['out_Bps', GAUGE, $2 ] ];
-
how to find name of the network interface
-
how do you list all instance of a counter
$ ./check_nrpe -c listCounterInstance -a "Network Interface"
-
check manually in windows using
performance
application gui -
use
typeperf.exe
> typeperf.exe -qx | find "Network Interface"
-