check_cluster

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
natalia.fitsyk
Posts: 29
Joined: Mon Aug 22, 2016 8:14 am

check_cluster

Post 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.
Attachments
check_rhcs_simple.sh.txt
(1.67 KiB) Downloaded 243 times
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: check_cluster

Post 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
Former Nagios Employee
Locked