Getting Windows Performance counters "just right"

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
mocjack
Posts: 31
Joined: Fri Dec 17, 2010 10:06 am

Getting Windows Performance counters "just right"

Post by mocjack »

I am running Nagios XI on CentOS 64bit and using NSCLIENT++ to monitor my windows servers.

I have one SQL server in which I need to monitor the transaction log size for a database, so I wanted to use the simple performance counter Windows has for this.

My command line in my service check is as follows:

-l "\\SQLServer:Databases\\BPM_Engine_PRD\\Log File(s) Size (KB)","Current BPM Transaction Log File is %.f" -w 2000000 -c 3000000

I check manually in explorer and the transaction log is currently 512MB.

When I run the check the rule in Nagios all I ever git is "Current BPM Transaction Log File is 0"

Can anyone look at this particular check and see what I am doing wrong?

Thanks to anyone in advance!

-Jack
mocjack
Posts: 31
Joined: Fri Dec 17, 2010 10:06 am

Re: Getting Windows Performance counters "just right"

Post by mocjack »

I have tried a couple new options... changing the %.f options but still no luck. Can anyone pls help with this one?

Thanks in advance!
rdedon
Posts: 578
Joined: Sat Nov 20, 2010 4:51 pm

Re: Getting Windows Performance counters "just right"

Post by rdedon »

Hello,
What version of NSClient++ are you running and also is it running the systray? (the latter can cause problems and some of the older version can be somewhat problematic)
Rene deDon
Technical Team
___
Nagios Enterprises, LLC
Web: http://www.nagios.com
mocjack
Posts: 31
Joined: Fri Dec 17, 2010 10:06 am

Re: Getting Windows Performance counters "just right"

Post by mocjack »

Hi thanks for the reply!

I am running NSCLient++ - 0.3.8.75. It is NOT running in the systray on this machine.

Hope this helps. Frustrating issue.
rdedon
Posts: 578
Joined: Sat Nov 20, 2010 4:51 pm

Re: Getting Windows Performance counters "just right"

Post by rdedon »

Hmm, that "should" be working from what you had posted previously. You may have to check with the guys over at NSCLient++ as they will likely have some better insight or know of such an issue from previous people.

http://nsclient.org/nscp/discussion/forum/1
I will do some digging around as well.
Rene deDon
Technical Team
___
Nagios Enterprises, LLC
Web: http://www.nagios.com
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Getting Windows Performance counters "just right"

Post by Box293 »

Try the version 0.3.9.

I had a similar issue. I was already using 0.3.7 and I tried 0.3.8 on a couple of machines. The output wasn't the same and when I updated to 0.3.9 it seemed to fix my problem.

For example you can see how the same check on two different hosts produced different output.

0.3.7
./check_nrpe -H 172.30.249.6 -t 30 -c CheckCounter -a "Counter=\\Terminal Services\\Active Sessions" Averages=false ShowAll
OK: \Terminal Services\Active Sessions: 1|'\Terminal Services\Active Sessions'=1;0;0;

0.3.9
./check_nrpe -H 172.30.249.7 -t 30 -c CheckCounter -a "Counter=\\Terminal Services\\Active Sessions" Averages=false ShowAll
OK: \Terminal Services\Active Sessions: 2
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
sandyspatil
Posts: 15
Joined: Tue Dec 07, 2010 6:31 am

Re: Getting Windows Performance counters "just right"

Post by sandyspatil »

Edit your NSC.ini file in NSClient++ dir. and enable the following parameter ->
allow_nasty_meta_chars=1
And restart the NSClient++ service.
rdedon
Posts: 578
Joined: Sat Nov 20, 2010 4:51 pm

Re: Getting Windows Performance counters "just right"

Post by rdedon »

Thank you both for the suggestions! :-)
Rene deDon
Technical Team
___
Nagios Enterprises, LLC
Web: http://www.nagios.com
mocjack
Posts: 31
Joined: Fri Dec 17, 2010 10:06 am

Re: Getting Windows Performance counters "just right"

Post by mocjack »

Still cannot get it to work. For reference, the counter I am trying to get is SQL Server:Databases - [database name] Log File(s) Size (KB)

I used the Windows Server Monitoring Wizard to create the service check. No matter what I do, it still returns a "0" as the result, even though the logfile is many gigabytes in size.

Here is the actual counter from perfmon:

Image

Here is a screenshot of my configuration screen for the service:

Image

My actual $ARG3$ which is cut off in the image is -l "\\SQLServer:Databases(BPM_Engine_PRD)\\Log File(s) Size (KB) %.f","BPM Production Transaction Log Size in KB is %.f" -w 10 -c 30

Does anyone have any clues as to what I should do?

Thanks in advance.
sandyspatil
Posts: 15
Joined: Tue Dec 07, 2010 6:31 am

Re: Getting Windows Performance counters "just right"

Post by sandyspatil »

I used this ->
./check_nrpe -H mssqlserver -t 30 -c CheckCounter -a "Counter=\SQLServer:Databases(dbase_name)\Log File(s) Used Size (KB)" ShowAll
-> OK: \SQLServer:Databases(dbase_name)\Log File(s) Used Size (KB): 990
and it work's for me displaying the actual log file size.
Locked