How I should monitoring (ping) 2 servers as one entity?


#1

Hello,

We need to check 2 internet servers doing ping checks, and Nagios should by alert us only in case of both are down.

If only one server respond to ping, nagios should consider that everything is ok.

How I should implement this? using dependencies, parent relathionships, …

Any help would by appreciated.

Best regards.

Example:

nagios box: 10.10.10.1
nagios gateway to internet: 10.10.10.254

server1: 4.2.2.1
server2: 4.2.2.2


#2

Hi,

You should use the check_cluster command for that. Here is an example :

define service {
   use                              TMPL-S-MTX-ExternalDNS_BC
   service_description              Ext DNS Hosts
   host_name                        nagios
   check_command                    check_host_cluster!"Ext DNS Cluster"!1!2!$HOSTSTATEID:dnsux12$,$HOSTSTATEID:dnsux13$
}

You will still get alerts if one of them is down, unless you disable host notifications for them individually.


#3

if you define a cluster, would you expect it to appear in the web interface?

I am doing a similar test to verify that at least N of 8 DNS servers are up, but I can’t see anything that makes me think nagios is aware of the cluster.

thanks
Paul