Page 2 of 3
Re: Windows Perf Counters with WMI or NCPA
Posted: Tue Mar 29, 2016 5:28 pm
by Box293
Follow this KB article, it shows you how to update check_wmi_plus.pl
https://support.nagios.com/kb/article.php?id=123
Re: Windows Perf Counters with WMI or NCPA
Posted: Wed Mar 30, 2016 10:11 am
by vAJ
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:
Code: Select all
-t 'toketoketoke' -P 5693 -M 'windowscounters/PhysicalDisk(0%20C:)/Avg.%20Disk%20Queue%20Length'
Re: Windows Perf Counters with WMI or NCPA
Posted: Wed Mar 30, 2016 11:40 am
by lmiltchev
Thank you, vAJ!
@krobertson71, let us know if you have any more questions.
Re: Windows Perf Counters with WMI or NCPA
Posted: Thu Mar 31, 2016 9:52 pm
by Box293
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
Re: Windows Perf Counters with WMI or NCPA
Posted: Mon Apr 11, 2016 1:48 pm
by krobertson71
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.
Re: Windows Perf Counters with WMI or NCPA
Posted: Mon Apr 11, 2016 2:43 pm
by vAJ
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:
Code: Select all
<PARAM NAME="Counter00003.Path" VALUE="\Process(chrome)\% User Time"/>
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.
Code: Select all
https://host.domain:5693/api/windowscounters/Process(chrome)/%%20User%20Time
Clear as mud, right?
Re: Windows Perf Counters with WMI or NCPA
Posted: Mon Apr 11, 2016 4:24 pm
by rkennedy
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.
Re: Windows Perf Counters with WMI or NCPA
Posted: Mon Apr 11, 2016 5:10 pm
by krobertson71
It's returning a 0 result. I have this perfmon running on the server and it's always above 5% at a min.
Code: Select all
https://vmassetcore01.dcri.int:5693/api/windowscounters/Process(mtxagent)/%%20User%20Time
I get this in the api return:
Code: Select all
{
"value": {
"windowscounters": [
[
0.0
],
"% User Time"
]
}
}
Re: Windows Perf Counters with WMI or NCPA
Posted: Mon Apr 11, 2016 5:40 pm
by vAJ
Are there multiple mtxagent processes? I've not tried monitoring a process CPU util via NCPA yet. I will test it though.
Re: Windows Perf Counters with WMI or NCPA
Posted: Mon Apr 11, 2016 5:49 pm
by krobertson71
No it's just the one process. No multiples.