Windows Perf Counters with WMI or NCPA
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: Windows Perf Counters with WMI or NCPA
Follow this KB article, it shows you how to update check_wmi_plus.pl
https://support.nagios.com/kb/article.php?id=123
https://support.nagios.com/kb/article.php?id=123
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Windows Perf Counters with WMI or NCPA
NCPA can be done, but the spaces and such in PerfCounter names can be a challenge.
Here's an example of my XI arg for check_xi_ncpa_agent:
Here's an example of my XI arg for check_xi_ncpa_agent:
Code: Select all
-t 'toketoketoke' -P 5693 -M 'windowscounters/PhysicalDisk(0%20C:)/Avg.%20Disk%20Queue%20Length'Andrew J. - Do you even grok?
Re: Windows Perf Counters with WMI or NCPA
Thank you, vAJ!
@krobertson71, let us know if you have any more questions.
@krobertson71, let us know if you have any more questions.
Be sure to check out our Knowledgebase for helpful articles and solutions!
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: Windows Perf Counters with WMI or NCPA
Thanks for that @vAJ, I've created a KB article that shows how to monitor performance counters with NCPA:
https://support.nagios.com/kb/article.php?id=491
Also updated this one:
https://support.nagios.com/kb/article.php?id=126
https://support.nagios.com/kb/article.php?id=491
Also updated this one:
https://support.nagios.com/kb/article.php?id=126
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
-
krobertson71
- Posts: 444
- Joined: Tue Feb 11, 2014 10:16 pm
Re: Windows Perf Counters with WMI or NCPA
Sorry for the very late reply.
This works great. I am hitting a wall with getting back a particular process % of Processor time. How do you specify an Instance in NCPA?
-t 'tokelokeytoker' -P 5693 -M 'windowscounters/Processes(mtxagent.exe)/%2520of%Processor%20time ?? What makes this difficult is if you screw up the syntax you do not get an error back, just an 0c.
Getting closer to the finish line though!
Also /Memory/Pages%2Fsec only returns 0c as well even though there is low paging activity on the remote host.
This works great. I am hitting a wall with getting back a particular process % of Processor time. How do you specify an Instance in NCPA?
-t 'tokelokeytoker' -P 5693 -M 'windowscounters/Processes(mtxagent.exe)/%2520of%Processor%20time ?? What makes this difficult is if you screw up the syntax you do not get an error back, just an 0c.
Getting closer to the finish line though!
Also /Memory/Pages%2Fsec only returns 0c as well even though there is low paging activity on the remote host.
Re: Windows Perf Counters with WMI or NCPA
Best way I've found is to add the counter you need to PerfMon, then copy the counter config out to a text editor of your choice.
Here's a line from said config:
I take the counter path and add it into the api/windowscounters url for the host to test:
Take what the browser rewrites that as and place that in your service check.
Clear as mud, right?
Here's a line from said config:
Code: Select all
<PARAM NAME="Counter00003.Path" VALUE="\Process(chrome)\% User Time"/>Take what the browser rewrites that as and place that in your service check.
Code: Select all
https://host.domain:5693/api/windowscounters/Process(chrome)/%%20User%20TimeAndrew J. - Do you even grok?
Re: Windows Perf Counters with WMI or NCPA
Thanks @vAJ!
That's a great way to do it, as the formatting can be a pain at times.
@krobertson71 - let us know if that helps.
That's a great way to do it, as the formatting can be a pain at times.
@krobertson71 - let us know if that helps.
Former Nagios Employee
-
krobertson71
- Posts: 444
- Joined: Tue Feb 11, 2014 10:16 pm
Re: Windows Perf Counters with WMI or NCPA
It's returning a 0 result. I have this perfmon running on the server and it's always above 5% at a min.
I get this in the api return:
Code: Select all
https://vmassetcore01.dcri.int:5693/api/windowscounters/Process(mtxagent)/%%20User%20TimeCode: Select all
{
"value": {
"windowscounters": [
[
0.0
],
"% User Time"
]
}
}Re: Windows Perf Counters with WMI or NCPA
Are there multiple mtxagent processes? I've not tried monitoring a process CPU util via NCPA yet. I will test it though.
Andrew J. - Do you even grok?
-
krobertson71
- Posts: 444
- Joined: Tue Feb 11, 2014 10:16 pm
Re: Windows Perf Counters with WMI or NCPA
No it's just the one process. No multiples.