Page 2 of 2
Re: NRDS does not report CPU utililzation
Posted: Wed Aug 19, 2015 4:47 pm
by essrichard
What can be done to at least get it assigned to somebody?
Re: NRDS does not report CPU utililzation
Posted: Wed Aug 19, 2015 4:49 pm
by tmcdonald
I can talk to the devs about it, but as I said we don't don't have control over their workflow so all I can do is make the request.
Re: NRDS does not report CPU utililzation
Posted: Thu Oct 29, 2015 9:22 am
by essrichard
Okay we need this bug fixed. As a paying customer, what can be done to escalate this issue?
Re: NRDS does not report CPU utililzation
Posted: Thu Oct 29, 2015 10:48 am
by tmcdonald
I'll be replying to your ticket about the issue shortly.
Re: NRDS does not report CPU utililzation
Posted: Fri Oct 30, 2015 11:35 am
by essrichard
Okay i wanted to post a workaround to this issue for the benefit of others. It is only a workaround basically because check_pdm.exe simply fails to grab CPU usage, so instead I have found a way to do it with a powershell script. With NRDS, you can put any new .ps1 or .vbs scripts on your Nagios XI server under:
/usr/local/nrdp/plugins/Windows/
Any plugins that are put here will be auto-downloaded by any NRDS agents that passively check in when there is a command/check that requires them in the config. After adding my script file to this directory which was named "cpu_usage.ps1", i just edited my NRDS config and added the command of:
command[CPU_Usage] = $PLUGIN_DIR$\cpu_usage.ps1
Here is the ps1 i created - it even retains historical data in XI due to the "|CPU=$cpu;90;95" portion at the end of each status message":
Code: Select all
$cpu = (Get-WmiObject win32_processor | Measure-Object -property LoadPercentage -Average).Average
if ($cpu -lt 90) {
Write-Host "OK - CPU usage is at $cpu Percent|CPU=$cpu;90;95"
exit 0
} elseif ($cpu -ge 90 -and $cpu -lt 95) {
Write-Host "WARNING - CPU usage is at $cpu Percent|CPU=$cpu;90;95"
exit 1
} elseif ($cpu -ge 95) {
Write-Host "CRITICAL - CPU usage is at $cpu Percent|CPU=$cpu;90;95"
exit 2
} else {
Write-Host "UNKNOWN - Something has gone wrong with the CPU check"
exit 3
}
Hope this helps somebody else! NRDS is awesome!
Re: NRDS does not report CPU utililzation
Posted: Fri Oct 30, 2015 1:15 pm
by lmiltchev
Hope this helps somebody else! NRDS is awesome!
Thanks for sharing, essrichard! I tested the script and it seems to be working fine.
example01.PNG