Event handling duration is longer for duplicate process chek

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
dattatray_kulkarni
Posts: 1
Joined: Thu Sep 06, 2012 11:29 pm

Event handling duration is longer for duplicate process chek

Post by dattatray_kulkarni »

Hi,

We are using Nagios to monitor duplicate process check.

#Checks duplicate procesces
define service{
use local-service
host_name OndotBox
service_description OnDot Duplicate Processes
check_interval 1
max_check_attempts 1
contact_groups admins
event_handler restart-dependent-processes
check_command check_procs_duplicate!2!3!2!2!2
}


The Check_procs_duplicate finds out if there is any duplicate process and returns CRITICAL_HARD if any instances of duplicate processes are found.

The Event handler fires susequently and performs the actions necessary for the CRITICAl-HARD state.
In our case, we are killing the duplicate processes and restarting the process and it's dependent process.
At the end of this, the event handler again checks if there are any duplicate processes and chnages tthe state to OK or CRITICAl_HARD based on this check.
Process restart takes more time, (sometimes more than 1 min).

If during this restart, if someone manually stats the process manually, this task remains in CRITICAL_HARD state and the subsequently checks and the event handlers doesn't fire.

Is there any way to overcome this situation?

We are not allowed to use any file locking to avoid duplicate processes.
Locked