Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

We are running Nagios for server monitoring, but are kicking around the idea of setting up a second instance from outside the network to check for connectivity issues outside the network. Is there a way to get a single Nagios instance to use multiple machines for a test? For example, we set up Nagios on nagios.domain.com to run the WebUI and do checking, and have nagios-child.domain.com just run checks.

I'd like to have nagios.domain.com and nagios-child.domain.com run a ping test against mysite.com and alert me if either one is down. Is this possible with Nagios or any other monitoring system?

share|improve this question

2 Answers 2

For your situation, you can have the remote host just run NRPE checks. The primary Nagios server will be running checks using the remote host.

For example, on your current Nagios server, define:

define host{
  use       generic-host
  host_name nagios-remote
  address   1.2.3.4
}

define service{
  use                 generic-service
  host_name           nagios-remote
  service_description Check Site1
  check_command       check_nrpe!check_site1
}

and so on with whatever services you want.

On the nagios-remote box, in the NRPE configuration, have something like this in the nrpe.cfg:

command[check_site1]=/usr/lib/nagios/plugins/check_http site1.example.com
command[check_site2]=/usr/lib/nagios/plugins/check_http site2.example.com

and so on.

Essentially, you don't need to run a full blown Nagios server on the remote host. You just have to run the NRPE service to execute checks on behalf of the Nagios server on your main box.

share|improve this answer

Sure, you can.

If you only want to monitor yoursite.com from 2 servers, just duplicate the configuration.

/usr/local/nagios/etc/objects/commands.cfg

define command{
    command_name    check_http
    command_line    $USER1$/check_http -H $ARG1$ -t 60
    }

/usr/local/nagios/etc/foo/bar.cfg

define service{
    use                     generic-service
    host_name               your host
    service_description     yoursite.com
    check_command           check_http!yoursite.com
    process_perf_data       0
    contact_groups          admin-sms,admin
    }

But if you want to set up fully redundant failover Nagios servers, take a look at this.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.