NRPE Windows check_network

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
very_best
Posts: 12
Joined: Wed Feb 01, 2017 10:34 am

check_network with NSCLient++

Post by very_best »

Hello!

I am new in Nagios and have implemented some checks for windows.
But with the network_check i have following problems:

check_nrpe -t 50 -H <server> -c check_network
: vmxnet3 Ethernet Adapter >301112294829 <301112294829 bps|'vmxnet3 Ethernet Adapter_total'=301112294829;10000;100000

Sorry for this questeion, but how can I change the values for warning and critical.
These values are in byte. Is it possible to get percentage, because our bandwith are different.

rg
Hansi
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: NRPE Windows check_network

Post by mcapra »

Which version of NSClient++ is your Windows machine using? The syntax varies a bit depending on the version.

To get the version:

Code: Select all

[root@xi-stable etc]# /usr/local/nagios/libexec/check_nrpe -H 192.168.67.99
I (0.5.0.62 2016-09-14) seem to be doing fine...
Here's the current documentation for the check_network command:
https://docs.nsclient.org/reference/win ... ck_network

If you simply wanted to set warning/critical thresholds:

Code: Select all

[root@xi-stable etc]# /usr/local/nagios/libexec/check_nrpe -H 192.168.67.99 -c check_network -a "warn=total>20000000000" "crit=total>30000000000"
: Intel(R) 82574L Gigabit Network Connection >13299539216 <13299539216 bps|'Intel(R) 82574L Gigabit Network Connection_total'=13299539216;20000000000;30000000000
[root@xi-stable etc]# echo $?
0

...

[root@xi-stable etc]# /usr/local/nagios/libexec/check_nrpe -H 192.168.67.99 -c check_network -a "warn=total>2000000000" "crit=total>3000000000"
: Intel(R) 82574L Gigabit Network Connection >13299565515 <13299565515 bps|'Intel(R) 82574L Gigabit Network Connection_total'=13299565515;2000000000;3000000000
[root@xi-stable etc]# echo $?
2
I don't see anything on the previous documentation that would allow you to change the unit returned from bps to kbps, Mbps, Gbps, etc. None of the following arguments I tried had any affect:

Code: Select all

[root@xi-stable etc]# /usr/local/nagios/libexec/check_nrpe -H 192.168.67.99 -c check_network -a "warn=total>2000000000" "crit=total>3000000000" "perf-config=perf-unit=M"
: Intel(R) 82574L Gigabit Network Connection >13300016382 <13300016382 bps|'Intel(R) 82574L Gigabit Network Connection_total'=13300016382;2000000000;3000000000
[root@xi-stable etc]# /usr/local/nagios/libexec/check_nrpe -H 192.168.67.99 -c check_network -a "warn=total>2000000000" "crit=total>3000000000" "perf-config=perf-unit=G"
: Intel(R) 82574L Gigabit Network Connection >13300016382 <13300016382 bps|'Intel(R) 82574L Gigabit Network Connection_total'=13300016382;2000000000;3000000000
[root@xi-stable etc]# /usr/local/nagios/libexec/check_nrpe -H 192.168.67.99 -c check_network -a "warn=total>2000000000" "crit=total>3000000000" "perf-config=perf-unit=Kbps"
: Intel(R) 82574L Gigabit Network Connection >13300046223 <13300046223 bps|'Intel(R) 82574L Gigabit Network Connection_total'=13300046223;2000000000;3000000000
[root@xi-stable etc]# /usr/local/nagios/libexec/check_nrpe -H 192.168.67.99 -c check_network -a "warn=total>2000000000" "crit=total>3000000000" "perf-config=*(unit:G)"
: Intel(R) 82574L Gigabit Network Connection >13300127837 <13300127837 bps|'Intel(R) 82574L Gigabit Network Connection_total'=13300127837G;2000000000;3000000000
[root@xi-stable etc]# /usr/local/nagios/libexec/check_nrpe -H 192.168.67.99 -c check_network -a "warn=total>2000000000" "crit=total>3000000000" "perf-config=*(unit:K)"
: Intel(R) 82574L Gigabit Network Connection >13300127837 <13300127837 bps|'Intel(R) 82574L Gigabit Network Connection_total'=13300127837K;2000000000;3000000000
Former Nagios employee
https://www.mcapra.com/
very_best
Posts: 12
Joined: Wed Feb 01, 2017 10:34 am

Re: NRPE Windows check_network

Post by very_best »

Hello!

thank you for reply.

my version:
I (0.5.0.32 2016-03-20) seem to be doing fine...

I need to set the Warning and Error thresholds for each server manually. This is not I want to do :).The next problem are the different bandwith of the included cards of the server.

OK, so I need to search for another plugin.

rg
Hansi
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: NRPE Windows check_network

Post by mcapra »

You could probably write a filter to address the different bandwidths of each device, but I haven't been able to find anything for check_network that allows you to change the units involved. You'd likely need to use a different plugin for that.

This plugin appears to be a wrapper for check_nt which queries the performance counters directly and does the basic math to adjust the units involved:
https://exchange.nagios.org/directory/P ... mi/details

Though I haven't done extensive testing of it.
Former Nagios employee
https://www.mcapra.com/
very_best
Posts: 12
Joined: Wed Feb 01, 2017 10:34 am

Re: NRPE Windows check_network

Post by very_best »

Hello!

I have take a look to the script.
But their is a Problem with new Version of nsclient++.
I don't get any NICs. So I can't build the performance-Counter.

If I find another solution, i will post it!

rg
Hansi
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: NRPE Windows check_network

Post by mcapra »

You also might consider WMI based monitoring:
https://exchange.nagios.org/directory/P ... us/details
Former Nagios employee
https://www.mcapra.com/
Locked