Import Breaks Nagios
Posted: Sat Mar 01, 2014 10:24 am
I am working on a project that would like to import all new hosts, services, hostgroups, etc.
A problem that has developed is that any import of any hosts, services, etc. seems to break the Nagios configuration as it does not sync with the database.
CentOS 6.4 64-bit
Nagios XI 2012R2.9
This is a test host imported using templates and contact_groups already created. This config file was named test2.cfg and placed in the /usr/local/nagios/etc/import directory.
define host {
host_name test2
use linux-server
alias Test MTA 2
address 192.168.1.1
contact_groups admins
register 1
}
Then the /usr/local/nagiosxi/scripts/reconfigure_nagios.sh command was exectuted and the
return was:
Checking for circular paths between hosts...
Checking for circular host and service dependencies...
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...
Total Warnings: 0
Total Errors: 0
Things look okay - No serious problems were detected during the pre-flight check
RET: 0
Running configuration check...done.
Stopping nagios: done.
Starting nagios: done.
So it looks like everything is OK and the host shows up in the configuration. However, now when apply configuration is used there is an error which is not reflected in the snapshots and is not evident when the manual pre-flight check is run. The host config file is in place and looks correct.
Looking in the CCM is says sync_missed for the host. So what it is obvious that the MySQL database is not syncing with the text files which look correct. Removing the host, readding the host, nothing that is done allows you to recover seemingly.
A problem that has developed is that any import of any hosts, services, etc. seems to break the Nagios configuration as it does not sync with the database.
CentOS 6.4 64-bit
Nagios XI 2012R2.9
This is a test host imported using templates and contact_groups already created. This config file was named test2.cfg and placed in the /usr/local/nagios/etc/import directory.
define host {
host_name test2
use linux-server
alias Test MTA 2
address 192.168.1.1
contact_groups admins
register 1
}
Then the /usr/local/nagiosxi/scripts/reconfigure_nagios.sh command was exectuted and the
return was:
Checking for circular paths between hosts...
Checking for circular host and service dependencies...
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...
Total Warnings: 0
Total Errors: 0
Things look okay - No serious problems were detected during the pre-flight check
RET: 0
Running configuration check...done.
Stopping nagios: done.
Starting nagios: done.
So it looks like everything is OK and the host shows up in the configuration. However, now when apply configuration is used there is an error which is not reflected in the snapshots and is not evident when the manual pre-flight check is run. The host config file is in place and looks correct.
Looking in the CCM is says sync_missed for the host. So what it is obvious that the MySQL database is not syncing with the text files which look correct. Removing the host, readding the host, nothing that is done allows you to recover seemingly.