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
Run test service command
Thanks for your time and support on this!
Update unit for Windows PerfMon counters
Re: Update unit for Windows PerfMon counters
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.
Re: Update unit for Windows PerfMon counters
Hello cdienger,
Here is the output when running the test command
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
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;
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
Re: Update unit for Windows PerfMon counters
Change the command from:
To:
Does that work for you?
Code: Select all
-l "\\Server Work Queues(0)\\Queue Length","Current work queue (an indication of processing load) is %.f "
Code: Select all
-l "\\Server Work Queues(0)\\Queue Length","Current work queue (an indication of processing load) is","YOURUNIT"
Re: Update unit for Windows PerfMon counters
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
Update:
I removed the %.f as you suggested - did not notice this change at first sight
The output is now OK with unit update!
The graph also is updated. Thanks for your support on this one
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;
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Update unit for Windows PerfMon counters
Great!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!
The graph also is updated. Thanks for your support on this oneCode: 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;
Locking thread