Error during applying of changes

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
mkeil77
Posts: 34
Joined: Sun Mar 09, 2014 5:59 am

Error during applying of changes

Post 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)
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Error during applying of changes

Post by tmcdonald »

Go to Configure -> Tools -> Write Config Files. Click the Delete button, then Write and finally Verify. Send screenshots of the Verify step.
Former Nagios employee
mkeil77
Posts: 34
Joined: Sun Mar 09, 2014 5:59 am

Re: Error during applying of changes

Post 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.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Error during applying of changes

Post 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
mkeil77
Posts: 34
Joined: Sun Mar 09, 2014 5:59 am

Re: Error during applying of changes

Post by mkeil77 »

Hi slansing,

thats what i already tried. the question is how is nagios (CCM) referring to an not existing cfg file?
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Error during applying of changes

Post 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.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
mkeil77
Posts: 34
Joined: Sun Mar 09, 2014 5:59 am

Re: Error during applying of changes

Post 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.
You do not have the required permissions to view the files attached to this post.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Error during applying of changes

Post by abrist »

Could you post the contents of:

Code: Select all

/usr/local/nagios/etc/services/Core Switch Active.cfg
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
mkeil77
Posts: 34
Joined: Sun Mar 09, 2014 5:59 am

Re: Error during applying of changes

Post 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.
You do not have the required permissions to view the files attached to this post.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Error during applying of changes

Post 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.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Locked