I am using NCPA v1.8.1 on a Windows 7 host and am trying to setup simple CPU % thresholds in Nagios. What I am experiencing is that on a multi-core host all it takes is one of the cores/CPUs to be over the threshold and then an alert is generated.
in ncpa.cfg:
...
[passive checks]
%HOSTNAME%|cpu usage = /cpu/percent --warning 80 --critical 90
and this output for - https://localhost:5693/api/cpu/percent
{
"value": {
"percent": [
[
5.2,
84.4,
8.7,
14.1,
],
"%"
]
}
}
With only the one CPU above the threshold the result is Warning yet the overall CPU use for the four CPUs is really < 30%. How do I configure it to use a combined percentage of all CPUs considered together? I am looking for the CPU metric shown on the NCPA dashboard that is labeled "Current" and is to the right of the CPU use graph.
NCPA CPU Thresholds on MultiProc Host
Re: NCPA CPU Thresholds on MultiProc Host
Try this:
Code: Select all
https://localhost:5693/api/cpu/percent?aggregate=avgBe sure to check out our Knowledgebase for helpful articles and solutions!
Re: NCPA CPU Thresholds on MultiProc Host
Perfect. That is exactly what I am looking for. I've been reading the NCPA API docs for hours trying to figure out how to do this. I didn't find anything explaining how to aggregate or average like this.
Thanks much!
Thanks much!
Re: NCPA CPU Thresholds on MultiProc Host
Looks like we can go ahead and close this thread. Thanks.