Disable the services on the standby Nagios XI server

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
xlin125
Posts: 172
Joined: Mon Jan 19, 2015 6:01 pm

Disable the services on the standby Nagios XI server

Post by xlin125 »

We have two Nagios XI 2014R2.7 servers (licensed) on Redhat 6.5 with a number of Linux servers running Nagios NRPE agent. One Nagios XI acts as primary with services enabled, and another acts as standby with services disabled but having self-monitoring and polling the primary XI. If I take the backup (via backup_xi.sh) on the primary XI and restore it (via restore_xi.sh) on the standby XI (I have a current post talking about this, and it seems working fine) for a failover, the standby will become the new primary and the primary will become the new standby. In this case, what is the best way to disable the services on the new standby because I do not want the duplicate monitoring on all Nagios NRPE agents? Since there are so many services configured, manually disabling these services on the new standby XI through its Nagios Web Interface is not a good option. We want an automation method/option to get it done. Any suggestions and help will be appreciated. Thanks!
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: Disable the services on the standby Nagios XI server

Post by jdalrymple »

In your nagios.cfg:

Code: Select all

enable_notifications=0
execute_service_checks=0
accept_passive_service_checks=0
execute_host_checks=0
accept_passive_host_checks=0
Of course this will also disable self-monitoring and the monitoring of the active node. Is that acceptable or are you looking to keep those 2 bits in place?
xlin125
Posts: 172
Joined: Mon Jan 19, 2015 6:01 pm

Re: Disable the services on the standby Nagios XI server

Post by xlin125 »

Thanks for the quick response!

Yes, the standby XI server always performs a self-monitoring that includes the CPU, SWAP, MEMORY, ROOT files system and a set of processes such as crond, snmpd, httpd, and sshd. It also performs a check_ping on the primary XI. In the case that the primary fails to work, it will take over and becomes the new primary. So we have to keep these two sets of monitoring. What we do not want is to make check_nrpe requests to all Nagios NRPE agent based Linux servers. So we are looking for a way to disable these services on the new standby XI server to avoid duplicate polling without manually touching the XI web interface. Any solutions?
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: Disable the services on the standby Nagios XI server

Post by jdalrymple »

If you setup your system from day 1 with a top level template you could just adjust it there. By default we make use of the generic-service and generic-host template for everything XI builds. If you went that route disabling those checks there would be trivial then just reapply the check at the host/service level needed to continue to monitor the other instance as well as the local machine.

Make any sense?
Locked