NRPE Windows check_network

An open discussion forum for obtaining help with Nagios Core. Nagios Core users of all experience levels are welcome here. Subforum have been created for the discussion of Nagios Core and Nagios Plugin development.

NOTE: The SourceForge.net mailing lists have been deprecated in favor of this forum in order to expedite support and provide additional features not available on the old mailing list.

check_network with NSCLient++

Postby very_best » Fri Mar 17, 2017 2:24 am

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
very_best
 
Posts: 10
Joined: Wed Feb 01, 2017 10:34 am

Re: NRPE Windows check_network

Postby mcapra » Fri Mar 17, 2017 1:05 pm

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
http://www.mcapra.com/
User avatar
mcapra
 
Posts: 2773
Joined: Thu May 05, 2016 3:54 pm

Re: NRPE Windows check_network

Postby very_best » Mon Mar 20, 2017 8:56 am

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
very_best
 
Posts: 10
Joined: Wed Feb 01, 2017 10:34 am

Re: NRPE Windows check_network

Postby mcapra » Mon Mar 20, 2017 12:37 pm

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
http://www.mcapra.com/
User avatar
mcapra
 
Posts: 2773
Joined: Thu May 05, 2016 3:54 pm

Re: NRPE Windows check_network

Postby very_best » Tue Mar 21, 2017 9:51 am

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
very_best
 
Posts: 10
Joined: Wed Feb 01, 2017 10:34 am

Re: NRPE Windows check_network

Postby mcapra » Tue Mar 21, 2017 12:50 pm

You also might consider WMI based monitoring:
https://exchange.nagios.org/directory/P ... us/details
Former Nagios employee
http://www.mcapra.com/
User avatar
mcapra
 
Posts: 2773
Joined: Thu May 05, 2016 3:54 pm


Return to Nagios Core

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 10 guests