Page 1 of 1

check_cluster

Posted: Tue Sep 06, 2016 2:42 am
by natalia.fitsyk
Hi everyone,
I have a problem with my custom plugin, I need to check the cluster so I implement the .sh in the remote machine.
On my Nagios Server the config are:

more /usr/local/nagios/etc/objects/commands.cfg
# 'check_cluster' command definition
define command{
command_name check_nrpe_cluster
command_line /usr/local/nagios/libexec/check_nrpe -H $HOSTADDRESS$ -c check_nrpe_cluster
}

more /usr/local/nagios/etc/objects/service.cfg
define service{
use generic-service
host_name remote_machine
service_description check cluster
check_command check_nrpe!check_nrpe_cluster!1!
}

more /usr/local/nagios/etc/hosts/remote_machine.cfg
define host {
host_name remote_machine
alias remote_machine
display_name cluster
address x.x.x.x
use
check_command check_nrpe_cluster!
use generic-host
}

when I execute the check_nrpe on server Nagios I have this output:

[root@server_nagios~]# /usr/local/nagios/libexec/check_nrpe -H x.x.x.x -c check_nrpe_cluster
CRITICAL:service_name disabled;:RGMANAGER:RUNNING;
(in this moment the service_name in disabled on my cluster for this test)

The output is same on the local machine:

[root@remote_machine ~]# /usr/local/nagios/libexec/check_nrpe -2 -H localhost -c check_nrpe_cluster
CRITICAL:service_name disabled;:RGMANAGER:RUNNING;

command[check_nrpe_cluster]=/usr/local/nagios/libexec/check_rhcs.sh -c 1

But the mail alert don't arrived.

What is wrong?

Thank for the help.

Re: check_cluster

Posted: Tue Sep 06, 2016 11:27 am
by rkennedy
Closing this out as it's a duplicate post, we will continue in your intiial thread.

https://support.nagios.com/forum/viewto ... 94#p195094