check_win_net_usage
-
download from here
-
requirements
-
check_nt plugin
-
nsclient++ installed on windows host
-
set variable
pluginlocationto 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
-
-Hhostname of windows server to check -
-plistening port of nsclient++ on windows server -
-spassword in case nsclient++ was defined to use a password -
-iname of network interface to use (not ethXcheck windows performance gui) -
-ochoose 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.cfguseport$ 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.cfguseport, 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
mapentry$ 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
performanceapplication gui -
use
typeperf.exe> typeperf.exe -qx | find "Network Interface"
-