Applying Config Error
Posted: Wed Oct 20, 2021 10:23 am
Hello Forum,
So we recieve the following error everytime we attempt to run an Apply Configuration:
Troubleshooting steps taken:
1. Attempted to attach the new [Parent Host] in the Host Status Detail and the Core Config Manager. - By all looks in NagiosXI this appears to work, but when applying the config we get the same error.
2. Rebooting the server. - This didn't change anything.
3. Recreated the missing [Parent Host] and attach it as the parent. - Didn't change anything.
4. Delete the [Child Host] and the replacement to the [Parent Host]. - Again didn't change anything.
Unfortunately it took us a while to catch this issue and enough attempts that my oldest snapshot is literally the first to error, so i can't roll it back.
Below is pull from the cmdsubsys.log file when I run the apply command. Looking at the mentioned tmp.cfg file, and only one host mentioned in the file (see [unrelated host]).
Thanks,
Robin
So we recieve the following error everytime we attempt to run an Apply Configuration:
I believe what happened was that the [Parent Host] was removed while still attached to the [Child Host].An error occurred while attempting to apply your configuration to Nagios Core. Monitoring engine configuration files have been rolled back to their last known good checkpoint.
Error: '[Parent Host]' is not a valid parent for host '[Child Host]'!
Troubleshooting steps taken:
1. Attempted to attach the new [Parent Host] in the Host Status Detail and the Core Config Manager. - By all looks in NagiosXI this appears to work, but when applying the config we get the same error.
2. Rebooting the server. - This didn't change anything.
3. Recreated the missing [Parent Host] and attach it as the parent. - Didn't change anything.
4. Delete the [Child Host] and the replacement to the [Parent Host]. - Again didn't change anything.
Unfortunately it took us a while to catch this issue and enough attempts that my oldest snapshot is literally the first to error, so i can't roll it back.
Below is pull from the cmdsubsys.log file when I run the apply command. Looking at the mentioned tmp.cfg file, and only one host mentioned in the file (see [unrelated host]).
Any help on troubleshooting this issue would be appreciated. I simply don't know the system well enough to look for this host and its parent to remove the error...........PROCESSING COMMAND ID 5664...
PROCESS COMMAND: CMD=17, DATA=
APPLYING NAGIOSCORE CONFIG...
CMDLINE=cd /usr/local/nagiosxi/scripts && ./reconfigure_nagios.sh
No entry for terminal type "unknown";
using dumb terminal settings.
--- reset_config_perms.sh ------------
> Setting script permissions
> Setting CCM script permissions
> Setting special script permissions
> Setting special component script permissions
> Setting migrate permissions
> Setting configuration file/directory permissions
> Setting perfdata directory and RRD permissions
> Setting libexec directory permissions
> Setting Nagios XI config permissions
> Setting NOM checkpoint user:group permissions
> + Setting Nagios Core corelog.newobjects user:group permissions
> + Setting Recurring Downtime file user:group permissions
> + Setting BPI configuration file user:group permissions
--------------------------------------
--- ccm_import.php -------------------
> Setting import directory: /usr/local/nagios/etc/import/
> Importing config files into the CCM
- Importing: /usr/local/nagios/etc/import/ZiY5c6VN.tmp.cfg .. ERROR
Duplicate entry '[Unrelated Host]' for key 'config_name'Entry host_name::[Unrelated Host]' inside tbl_host could not be inserted: 1<br>
--------------------------------------
Importing into the CCM failed!
OUTPUT=Importing into the CCM failed!
RETURNCODE=2
PROCESSING COMMAND ID 5665...
PROCESS COMMAND: CMD=1150, DATA=remove
CMDLINE=php /usr/local/nagiosxi/html/includes/components/nagiosbpi/api_tool.php --cmd=syncall
CMD: syncall
MSG: BPI configuration applied successfully! BPI configuration applied successfully!
OUTPUT=MSG: BPI configuration applied successfully! BPI configuration applied successfully!
RETURNCODE=0
............................
Thanks,
Robin