Page 1 of 2
Error during applying of changes
Posted: Wed Aug 20, 2014 1:58 pm
by mkeil77
Hi,
i'm getting a strange error if im trying to apply the config after some changes in services or host (CCM).
please see below.
The strange thing is that the mentioned config file does not exist and also the host/service dos not exist in CCM.
i already deleted the config files and got them re-writen out of CCM.
No Luck.
This error ocured ofter upgrading from 2014R1.3 to 1.4
Error: Could not find any host matching '12.34.56.78' (config file '/usr/local/nagios/etc/services/Core Switch Active.cfg', starting on line 158)
Error: Failed to expand host list '12.34.56.78' for service 'GB Port2/4 Status' (/usr/local/nagios/etc/services/Core Switch Active.cfg:158)
Re: Error during applying of changes
Posted: Wed Aug 20, 2014 1:59 pm
by tmcdonald
Go to Configure -> Tools -> Write Config Files. Click the Delete button, then Write and finally Verify. Send screenshots of the Verify step.
Re: Error during applying of changes
Posted: Wed Aug 20, 2014 2:35 pm
by mkeil77
HI tmcdonald ,
thats exactly what i done and when i wrote the config files only the one which i had in my CCM got writen, as it should be.
The verify finished without any errors.
will post later some screenshots of each step.
Re: Error during applying of changes
Posted: Wed Aug 20, 2014 4:48 pm
by slansing
It's quite possible it found old latent ghost configs, please navigate to the Write Config Tool and click "Delete," then "Write/Verify/Restart" That should take care of the ghosts as they are not in the database. If issues arise you can use the config snapshot tool to revert back, you could also back up your configs in:
Code: Select all
/usr/local/nagios/etc/hosts & /services
Re: Error during applying of changes
Posted: Wed Aug 20, 2014 10:51 pm
by mkeil77
Hi slansing,
thats what i already tried. the question is how is nagios (CCM) referring to an not existing cfg file?
Re: Error during applying of changes
Posted: Thu Aug 21, 2014 10:35 am
by abrist
The CCM pulls the configuration from the nagiosql database. Apply config will then write/overwrite the necessary configs.
If ghost configs are returning after a "Delete", the apply configuration process is most likely failing which will in turn write out the last known good configuration (which may include the ghost configs). You will need to run the write config files tool by clicking "delete", "write", and then "verify". If you have errors, resolve them in the ccm and then repeat the "write", "verify", and resolve errors steps. Only apply config once all errors are resolved.
Re: Error during applying of changes
Posted: Fri Aug 22, 2014 7:13 am
by mkeil77
Hi,
we did the following "delete", "write", and then "verify".
please see below verify result.but still getting the same error when trying to apply the host or service config.
The thing is that the mentioned service and/or host is not showing in any config file.
Re: Error during applying of changes
Posted: Fri Aug 22, 2014 9:41 am
by abrist
Could you post the contents of:
Code: Select all
/usr/local/nagios/etc/services/Core Switch Active.cfg
Re: Error during applying of changes
Posted: Mon Aug 25, 2014 2:09 am
by mkeil77
Hi,
please see attached the .cfg file.
The IP mentioned in the error message is 10.99.0.3 which is not mentioned in the config file.
Re: Error during applying of changes
Posted: Mon Aug 25, 2014 10:29 am
by abrist
Well, that config only has 2 switch ports configured - neither of which were mentioned in the error message.
Could you download the config from the ccm? Go to CCM --> Services --> limit search to just "Core Switch Active" and then click the disk icon for any of the services on that host. It should download a full text config for the services built from the ccm. Post that file.