Exclude process from CPU

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
djansen1987
Posts: 4
Joined: Sun Nov 03, 2013 8:00 pm

Exclude process from CPU

Post by djansen1987 »

Dear All,

We monitor a backup server. This server is busy let say from 2:00 am till 4:00 am. In this this the CPU is at 100% due to the backup process that takes all the power there is.

We cannot set a threshold for the process. So what i'm searching for is a way to exclude the whole process from the CPU monitoring. Is there some way to do this??

Thanks in advanced.

Daniël
V3xX
Posts: 26
Joined: Wed Aug 29, 2012 6:48 am
Location: Switzerland

Re: Exclude process from CPU

Post by V3xX »

i don't know if there is a way to do so,
but if you just don't want to get the alert, change the notification_period for this service?


regards
There are 10 kinds of people on world,
those who understand binary and those who don't.
djansen1987
Posts: 4
Joined: Sun Nov 03, 2013 8:00 pm

Re: Exclude process from CPU

Post by djansen1987 »

That what i said. But wanna be sure there is no other way to get this done.

thanks!
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Exclude process from CPU

Post by tmcdonald »

You could always schedule downtime or set a notification/checking time period.
Former Nagios employee
User avatar
eloyd
Cool Title Here
Posts: 2129
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: Exclude process from CPU

Post by eloyd »

Not sure whether your backup server is capable of doing this or not (OS, scripting capabilities, etc), but you could have it send a command to Nagios via SSH to disable service checks when the backup starts, and then enable them when they finish. We do this all the time to avoid having to specify downtime or to specify notification (or execution) windows. That way, if the window changes, we don't have to remember to change the window, since the script disables the appropriate service in Nagios directly.

This solution is somewhat advanced, as you need to be able to use the Nagios Core API and you need to have access to the command pipe to send them to Nagios, but you can find what you need at http://old.nagios.org/developerinfo/ext ... ndlist.php. Specifically, http://old.nagios.org/developerinfo/ext ... mmand_id=6 would be your disable and http://old.nagios.org/developerinfo/ext ... mmand_id=5 would be your enable. You may need to set up phraseless SSH capabilities from your backup server to your Nagios host to make this work, but I find that once you've built this sort of framework, the rewards are a VERY configurable (and very quiet) Nagios Core. :)
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoydI'm a Nagios Fanatic!
Locked