CheckCounter for PageFile Usage on Windows 2012

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
User avatar
sikainfo
Posts: 105
Joined: Thu Mar 29, 2012 3:26 am

CheckCounter for PageFile Usage on Windows 2012

Post by sikainfo »

Hi there,
my original checks with check_nt are not working on a Windows 2012 Server (latest Version of nsclient++).
Checks with check_nrpe are working properly. Can someone help my with the syntax for the command CheckCounter for the "Pagefile Usage" on a Windows 2012 Server?

Regards Andy
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: CheckCounter for PageFile Usage on Windows 2012

Post by sreinhardt »

Which particular checks via check_nt are not working? Also what version of nslcient are you running? So you would like to specifically use performance counters to check pagefile?
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
User avatar
sikainfo
Posts: 105
Joined: Thu Mar 29, 2012 3:26 am

Re: CheckCounter for PageFile Usage on Windows 2012

Post by sikainfo »

Pagefile usage in % is not working for example:

/usr/local/nagios/libexec/check_nt -H ****** -s "" -p 12489 -v COUNTER -l "\\\\Paging File\(_Total\)\\\\% Usage","Paging file usage is %.2f %%" -w 95 -c 98

On Windows Server 200x works fine, 2012 not at all!

On the Windows 2012 Server I've installed the latest version of NSClient++ 0.4.1.107, standard the Version 0.4.0.172 is installed, I had the hope, maybe with a newer Version it may work under 2012. :? :cry:

I'm open for other possibilities to get out the Usage of the Pagefile, if you know some .... :)

Thanks Andy
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: CheckCounter for PageFile Usage on Windows 2012

Post by slansing »

Do you have any other working counter checks on the 2012 server? What error are you receiving for the page file check?
User avatar
sikainfo
Posts: 105
Joined: Thu Mar 29, 2012 3:26 am

Re: CheckCounter for PageFile Usage on Windows 2012

Post by sikainfo »

Hi

These are some of the commands/checks we run against the Windows 2012 Server

/usr/local/nagios/libexec/check_nrpe -H xxxxxxxxx -t 30 -c CheckMEM -a MinWarn=1% MinCrit=1% ShowAll=long type=physical -----> works fine
/usr/local/nagios/libexec/check_nrpe -H xxxxxxxxx -t 30 -c CheckDriveSize -a ShowAll=long CheckAll FilterType=FIXED FilterType=REMOTE -----> works fine
/usr/local/nagios/libexec/check_nt -H xxxxxxxx -s "" -p 12489 -v UPTIME -----> works not
Error message: CRITICAL - Socket timeout after 10 seconds
/usr/local/nagios/libexec/check_nt -H ****** -s "" -p 12489 -v COUNTER -l "\\\\Paging File\(_Total\)\\\\% Usage","Paging file usage is %.2f %%" -w 95 -c 98 -----> works not
Error message: CRITICAL - Socket timeout after 10 seconds

Another very strange behavior is that the base Host check (Host alive) goes sometimes to CRITICAL even when the Service checks like Disks usage are OK?
2013-08-13 12-02-02_Nagios XI.png
2013-08-13 12-02-02_Nagios XI.png
You do not have the required permissions to view the files attached to this post.
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: CheckCounter for PageFile Usage on Windows 2012

Post by sreinhardt »

The critical socket timeout means that either your device is under very heavy load and cannot respond within 10 seconds, or more likely something is stopping nsclient from communicating with the check_nt plugin. As for your performance counters, you should only need 2 \'s not 4, one for escaping and one for the literal one you would like to pass. It should probably look similar to "\\Paging File\(_Total\)\\% Usage". As for testing your nsclient settings, let's start by making sure the port is open.

Code: Select all

nmap -p 12489 [Server ip]
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
User avatar
sikainfo
Posts: 105
Joined: Thu Mar 29, 2012 3:26 am

Re: CheckCounter for PageFile Usage on Windows 2012

Post by sikainfo »

nmap -p 12489 xxxxxx.ch.sika.com

Starting Nmap 5.51.6 ( http://nmap.org ) at 2013-08-13 16:41 CEST
Nmap scan report for widems247.ch.sika.com (10.12.8.20)
Host is up (0.00080s latency).
PORT STATE SERVICE
12489/tcp filtered unknown

Nmap done: 1 IP address (1 host up) scanned in 0.46 seconds


For me this looks good
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: CheckCounter for PageFile Usage on Windows 2012

Post by slansing »

Try extending the timeout of your check command by adding the following to your command when you run it manually from Nagios:

Code: Select all

-t 30
Let us know if it is still timing out, if it does, check your nsclient.log file from the windows server. It will be located in the Nsclient++ installation directory and should update when anything changes with the daemon whether it be outgoing or incoming data, or otherwise.
User avatar
sikainfo
Posts: 105
Joined: Thu Mar 29, 2012 3:26 am

Re: CheckCounter for PageFile Usage on Windows 2012

Post by sikainfo »

Command against Windows2012:

/usr/local/nagios/libexec/check_nt -H wixxxs247 -s "" -p 12489 -v COUNTER -l "\\Paging File\(_Total\)\\% Usage","Paging file usage is %.2f %%" -w 95 -c 98 -t 30
CRITICAL - Socket timeout after 30 seconds

Command against Windows 2008

/usr/local/nagios/libexec/check_nt -H wixxxs240 -s "" -p 12489 -v COUNTER -l "\\Paging File\(_Total\)\\% Usage","Paging file usage is %.2f %%" -w 95 -c 98 -t 30
Paging file usage is 0.00 % | 'Paging file usage is %.2f %%'=0.000000%;95.000000;98.000000;

I enabled the debug mode in nsclient.ini, restarted the service, and tested two times the command attached you find the INI and the LOG after this procedure.
Maybe i have configured something wrong?
You do not have the required permissions to view the files attached to this post.
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: CheckCounter for PageFile Usage on Windows 2012

Post by sreinhardt »

I don't see any reference of your counter checks in the log.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Locked