Creating Test Environment from Clone

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
blariv
Posts: 190
Joined: Wed Sep 26, 2012 11:55 am

Creating Test Environment from Clone

Post by blariv »

Hi,

looking to build a test instance by cloning my existing prod nagiosxi server.

successful clone
disconnected eth adapter
changed IP address
stopped nagios
ran these commands and verified in nagios.cfg

sed -i 's/enable_notifications=1/enable_notifications=0/' /usr/local/nagios/etc/nagios.cfg
sed -i 's/execute_service_checks=1/execute_service_checks=0/' /usr/local/nagios/etc/nagios.cfg
sed -i 's/execute_host_checks=1/enable_notifications=0/' /usr/local/nagios/etc/nagios.cfg

echo "update xi_options set value = 'https://192.168.3.3/nagiosxi/' where name = 'url';" | mysql -uroot -pnagiosxi nagiosxi


after this i rebooted connected nic

few minutes later my users started getting flooded w/ timeout errors. we have a mix of passive/active checks.

not sure what i'm doing wrong?
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Creating Test Environment from Clone

Post by ssax »

They only way that I could get it to fail is if I had enable_notification=0, then started up nagios, then changed Admin > Monitoring Engine Status to change the runtime config to turn Notifications on, then rebooted and it still was enabled. I'm wondering if your runtime config was overriding it like that. Could that have happened?

Additionally, you have an error in your command (related but still needs to be resolved) and will likely need to update the nagios.cfg file to remove one of the enable_notifications=0 and replace it with the proper execute_host_checks line:

This:

Code: Select all

sed -i 's/execute_host_checks=1/enable_notifications=0/' /usr/local/nagios/etc/nagios.cfg
Should be this:

Code: Select all

sed -i 's/execute_host_checks=1/execute_host_checks=0/' /usr/local/nagios/etc/nagios.cfg

For why they are actually timing out though:

Did you also update all the agents and firewall rules to allow incoming connections from the new servers IP? As they have different IP addresses you will need to update the agents/FW rules/etc to allow them.
Locked