CLI import configs mystery
Posted: Wed Sep 11, 2013 12:29 pm
Running automated config import via CLI. Seems to run without error but no hosts in dashboard. This is a fresh install.
Deployed Nagios XI AMI (EC2) in Amazon: nagiosxi appliance 1.2
CentOS release 6.3
Nagios XI 2012R2.3
I am parsing host data from EC2 API to create host config files. I have 2 temp folders. One I write host config files to. The second I run xiprepimport.php against each file to generate a new file in temp folder 2. I then copy those files into /usr/local/nagios/etc/import/. Change directory to /usr/local/nagiosxi/scripts an run reconfigure_nagios.sh
-- Auth works
-- All files are processed without error returning “nagiosql.import.monitoring” saved for each file.
-- /usr/local/nagios/etc/import/ is now empty
-- Files are visible in dashboard at CCW/Tools/Configuration Import (but shows all files that are in the second temp folder, not /usr/local/nagios/etc/import/).
-- Restarting nagios manually, still no new configs
-- Logged into DB. No new hosts in tbl_host in nagiosql database
-- Enabled query logging on MySql. I'm seeing, with no errors:
-- Reviewing output from reconfigure_nagios.sh shows no errors. Exit 0.
-- /verify.php --no-check-certificate --post-data 'writeMonitoring=Go' -O nagiosql.export.monitoring WRITE CONFIGS SUCCESSFUL!
-- Config File Permissions Check comes back as Okay.
So it looks like the config is being submitted to the database, but when I query the database, nothing is there. And no new hosts in UI. No new config files generated from DB. I don't know if something is cleaning these up after submitting, or some weird MySQL issue. In any event, I cannot get new configs into Nagios XI via API.
Deployed Nagios XI AMI (EC2) in Amazon: nagiosxi appliance 1.2
CentOS release 6.3
Nagios XI 2012R2.3
I am parsing host data from EC2 API to create host config files. I have 2 temp folders. One I write host config files to. The second I run xiprepimport.php against each file to generate a new file in temp folder 2. I then copy those files into /usr/local/nagios/etc/import/. Change directory to /usr/local/nagiosxi/scripts an run reconfigure_nagios.sh
-- Auth works
-- All files are processed without error returning “nagiosql.import.monitoring” saved for each file.
-- /usr/local/nagios/etc/import/ is now empty
-- Files are visible in dashboard at CCW/Tools/Configuration Import (but shows all files that are in the second temp folder, not /usr/local/nagios/etc/import/).
-- Restarting nagios manually, still no new configs
-- Logged into DB. No new hosts in tbl_host in nagiosql database
-- Enabled query logging on MySql. I'm seeing, with no errors:
Code: Select all
INSERT INTO `tbl_host` SET `name` = 'app01-stage_int_pdx_ourdomain_com',`alias` = 'app01-stage.int.pdx.ourdomain.com',`display_name` = '(pdx-stage) app01-stage',`address` = '10.101.0.164', `config_id`=1, `active`='1', `last_modified`=NOW()
-- /verify.php --no-check-certificate --post-data 'writeMonitoring=Go' -O nagiosql.export.monitoring WRITE CONFIGS SUCCESSFUL!
-- Config File Permissions Check comes back as Okay.
So it looks like the config is being submitted to the database, but when I query the database, nothing is there. And no new hosts in UI. No new config files generated from DB. I don't know if something is cleaning these up after submitting, or some weird MySQL issue. In any event, I cannot get new configs into Nagios XI via API.