CPU 100% alerts

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
angus
Posts: 125
Joined: Thu May 28, 2015 8:17 am

CPU 100% alerts

Post by angus »

I have virtual servers that contain multiple cores that represent the CPU. If one core hits 100% then an alarm goes off. Can i combine all the cores and average out the CPU power to make the alerts more representative to the actual issue? Please see image.
You do not have the required permissions to view the files attached to this post.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: CPU 100% alerts

Post by tgriep »

Can you post the current check that you are using and which OS and version the virtual server is running?
Be sure to check out our Knowledgebase for helpful articles and solutions!
angus
Posts: 125
Joined: Thu May 28, 2015 8:17 am

Re: CPU 100% alerts

Post by angus »

COMMAND: /usr/local/nagios/libexec/check_ncpa.py -H X.X.X.X -t 'XXXXXXXXX' -P 5693 -M cpu/percent
OUTPUT: OK: percent was 1%,0%,100%,0%,0%,0%,0%,0% | 'percent_0'=1%;;; 'percent_1'=0%;;; 'percent_2'=100%;;; 'percent_3'=0%;;; 'percent_4'=0%;;; 'percent_5'=0%;;; 'percent_6'=0%;;; 'percent_7'=0%;;;
angus
Posts: 125
Joined: Thu May 28, 2015 8:17 am

Re: CPU 100% alerts

Post by angus »

Windows server 2008 sp2 x64
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: CPU 100% alerts

Post by tmcdonald »

What NCPA and plugin versions are you using? Depending on your version, you might have the aggregation function available:

https://github.com/NagiosEnterprises/nc ... t-97501818
Former Nagios employee
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: CPU 100% alerts

Post by tgriep »

I confirmed that you have to upgrade to the latest NCPA software on the windows host and also the plugin on the XI system
You can get is here.
https://assets.nagios.com/downloads/ncp ... on-windows

After updating both, you would define your command like below. That will aggregate and average the check for you.

Code: Select all

 /usr/local/nagios/libexec/check_ncpa.py -H 192.168.1.1 -t ncpapass -P 5693 -M cpu/percent -q aggregate=avg
Be sure to check out our Knowledgebase for helpful articles and solutions!
angus
Posts: 125
Joined: Thu May 28, 2015 8:17 am

Re: CPU 100% alerts

Post by angus »

Will i have to upgrade the plugin for every host i am monitoring with NCPA?
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: CPU 100% alerts

Post by tmcdonald »

The plugin resides on the Nagios XI machine, so you will only need to upgrade that once, however the agent running on the Windows machine will need to be updated on any that you want aggregation for.
Former Nagios employee
angus
Posts: 125
Joined: Thu May 28, 2015 8:17 am

Re: CPU 100% alerts

Post by angus »

I am on NCPA 1.8.1, is that not the latest version?

Below is the result to the aggregate=avg tag. I switched the -Q from your command to an -A.

./check_ncpa.py -H X.X.X.X -t XXXXXX -P 5693 -M cpu/percent -a aggregate=avg
OK: percent was 0%,0%,0%,0%,100%,0%,0%,100%,100%,0%,0%,0% | 'percent_0'=0%;;; 'percent_1'=0%;;; 'percent_2'=0%;;; 'percent_3'=0%;;; 'percent_4'=100%;;; 'percent_5'=0%;;; 'percent_6'=0%;;; 'percent_7'=100%;;; 'percent_8'=100%;;; 'percent_9'=0%;;; 'percent_10'=0%;;; 'percent_11'=0%;;;
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: CPU 100% alerts

Post by tgriep »

NCPA 1.8.1 is the latest version for the client but if the -q argument doesn't work, you will need to update the plugin on the Nagios XI system.
You can download it at this link and then upload it to the XI system and the -q argument should work for you.
https://raw.github.com/NagiosEnterprise ... ck_ncpa.py
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked