CPU Usage detail

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
rex007can
Posts: 2
Joined: Wed Feb 23, 2011 3:53 pm

CPU Usage detail

Post by rex007can »

I am monitoring some servers with Nagios on CentOS and NSCA++ on Windows.

Everything is okay, except I have a "misbehaving" server that occasionally tops out a 99% CPU for a few hours during the night.
I get the nagios warnings about CPU usage, but is there a way to monitor which service on the server is using all the CPU?

Is there a check, using NSCA++ or NC_NET or anything else that would send me a warning that "Process XXX is taking 50% of the CPU for XX Minutes"?

I havent been able to figure that out.


Thanks.
yancy
Posts: 523
Joined: Thu Oct 06, 2011 10:12 am

Re: CPU Usage detail

Post by yancy »

rex007can,

You can monitor the cpu usage of a specific process using WMI which doen't require any agent be installed.

for example:

Check CPU utilisation for some SQL server processes, warn if utilisation is more than 10% or if there are more than 2 processes
Command:

check_wmi_plus.pl -H HOST -u USER -p PASS -m checkproc -s cpu -a %sql% -w 10 -w _ItemCount=2

Output : OK (Sample Period 59 sec) - Found 1 Instance(s) of "%sql%" running. CPU_sqlservr(PID=2220)=0.0% |'Process Count'=1;2; 'Avg Utilisation CPU_sqlservr'=0.0%;10;

The WMI wizard can be found here:
http://exchange.nagios.org/directory/Ad ... rd/details



alternatively,

If you want to use NSClient++, you could use an external plugin such as:

[/url]http://exchange.nagios.org/directory/Pl ... TK/details [url]

Regards,

-Yancy
Locked