Update unit for Windows PerfMon counters

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
mouch
Posts: 3
Joined: Fri Jan 04, 2019 10:56 am

Update unit for Windows PerfMon counters

Post by mouch »

Hi Nagios Community,

I've been struggling for few days already trying to fix a non critical but annoying issue I'm facing with services that are checking windows PerfMon counters.

I started to use them following the example that is included in the Windows Server Monitoring Wizard.
In this wizard, we can pick for example the Server Work Queue - right after its creation, the service is returning data (aligned with the server counter, good) but I cannot find a way to update the unit of the result.

It is always displayed as a % where I would like to change it to whatever I need (time, B, count, whatever). Do you know how to achieve this?


Please find below few pictures of the test service I created from the Windows Server Configuration Wizard

Performance Chart - not showing data as this is a new service but still trying to display % only
Image

Run test service command
Image


Thanks for your time and support on this!
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: Update unit for Windows PerfMon counters

Post by cdienger »

The images didn't make it through. Please try attaching them again.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
mouch
Posts: 3
Joined: Fri Jan 04, 2019 10:56 am

Re: Update unit for Windows PerfMon counters

Post by mouch »

Hello cdienger,


Here is the output when running the test command

Code: Select all

Current work queue (an indication of processing load) is 0  | 'Current work queue (an indication of processing load) is %.f '=0.000000%;4.000000;7.000000;
We can already see here the % (whereas it should have no unit)

And here is the graph outputted (hopefully that time you will see the picture)
https://imgur.com/4DqRKCK


Thanks for your support


Edit: I removed the img balise, it seems like the link is working but I cannot get it rendered with the balise. You will have to copy the URL if you want to view the picture
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Update unit for Windows PerfMon counters

Post by ssax »

Change the command from:

Code: Select all

-l "\\Server Work Queues(0)\\Queue Length","Current work queue (an indication of processing load) is %.f "
To:

Code: Select all

-l "\\Server Work Queues(0)\\Queue Length","Current work queue (an indication of processing load) is","YOURUNIT"
Does that work for you?
mouch
Posts: 3
Joined: Fri Jan 04, 2019 10:56 am

Re: Update unit for Windows PerfMon counters

Post by mouch »

Hi ssax and thanks for your reply.
Unfortunatly, adding the unit with your propose formatting is not changing anything (whatever unit I choose (tried X,s,ms))

See below my service testing output

Code: Select all

[XXX]$ /usr/local/nagios/libexec/check_nt -H YYY -s ZZZ -p 12489 -v COUNTER -l "\\Server Work Queues(0)\\Queue Length","Current work queue (an indication of processing load) is %.f ","ms" -w 4 -c 7 
Current work queue (an indication of processing load) is 0  | 'Current work queue (an indication of processing load) is %.f '=0.000000%;4.000000;7.000000;

Update:

I removed the %.f as you suggested - did not notice this change at first sight
The output is now OK with unit update!

Code: Select all

Current work queue (an indication of processing load) is  = 0.00 COUNT | 'Current work queue (an indication of processing load) is '=0.000000COUNT;4.000000;7.000000;
The graph also is updated. Thanks for your support on this one
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Update unit for Windows PerfMon counters

Post by scottwilkerson »

mouch wrote:Hi ssax and thanks for your reply.
Unfortunatly, adding the unit with your propose formatting is not changing anything (whatever unit I choose (tried X,s,ms))

See below my service testing output

Code: Select all

[XXX]$ /usr/local/nagios/libexec/check_nt -H YYY -s ZZZ -p 12489 -v COUNTER -l "\\Server Work Queues(0)\\Queue Length","Current work queue (an indication of processing load) is %.f ","ms" -w 4 -c 7 
Current work queue (an indication of processing load) is 0  | 'Current work queue (an indication of processing load) is %.f '=0.000000%;4.000000;7.000000;

Update:

I removed the %.f as you suggested - did not notice this change at first sight
The output is now OK with unit update!

Code: Select all

Current work queue (an indication of processing load) is  = 0.00 COUNT | 'Current work queue (an indication of processing load) is '=0.000000COUNT;4.000000;7.000000;
The graph also is updated. Thanks for your support on this one
Great!

Locking thread
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked