After many days of working and searching onn the net, I'm getting back to you as a last chance for help. I'm working actually on monitoring unix process with nagios core 4.4.3 with nrpe .
My goal is to check that : exactly 1 process with command "java" is running from maximum 23 hours USING ONLY ONE SERVICE
This process is restarted every day.
below what I have on the client_host (/etc/nagios/nrpe.cfg) :
command[check_java]=/usr/lib64/nagios/plugins/check_procs -c 1:1 -C java
command[check_java_elapsed]=/usr/lib64/nagios/plugins/check_procs -c :82800 --metric=ELAPSED -C java
On the server (/usr/local/nagios/etc/client_host.cfg) :
define service{
use generic-service
host_name client_host
service_description java_elapsed
check_command check_nrpe!check_java
check_period 24x7
max_check_attempts 3
normal_check_interval 1
retry_check_interval 2
}
define service{
use generic-service
host_name client_host
service_description perl_elapsed
check_command check_nrpe!check_java_elapsed
check_period 24x7
max_check_attempts 3
normal_check_interval 1
retry_check_interval 2
}
In all, I want to combine the two services in one service