NRDS does not report CPU utililzation
-
essrichard
- Posts: 24
- Joined: Wed Apr 29, 2015 12:10 pm
Re: NRDS does not report CPU utililzation
What can be done to at least get it assigned to somebody?
Re: NRDS does not report CPU utililzation
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.
Former Nagios employee
-
essrichard
- Posts: 24
- Joined: Wed Apr 29, 2015 12:10 pm
Re: NRDS does not report CPU utililzation
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
I'll be replying to your ticket about the issue shortly.
Former Nagios employee
-
essrichard
- Posts: 24
- Joined: Wed Apr 29, 2015 12:10 pm
Re: NRDS does not report CPU utililzation
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":
Hope this helps somebody else! NRDS is awesome!
/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
}Re: NRDS does not report CPU utililzation
Thanks for sharing, essrichard! I tested the script and it seems to be working fine.Hope this helps somebody else! NRDS is awesome!
You do not have the required permissions to view the files attached to this post.
Be sure to check out our Knowledgebase for helpful articles and solutions!