Error while applying configuration changes

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
sagarjatti
Posts: 25
Joined: Fri Nov 02, 2012 8:25 am

Error while applying configuration changes

Post by sagarjatti »

Hi Team,

After i upgrade the nagios from 2012 version to 2014R2.6 i am facing problem in applying configuration changes, whenever i apply configuration changes it refers to serviceextinfo.cfg file it throughs error for all hosts which are deifined in serviceextinfo.cfg.

i have commented serviceextinfo.cfg file inside nagios.cfg file but still we get same error and if i validate the nagios process by running the command "/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg" i get below set of Warning messages

WARNING: Extinfo objects are deprecated and will be removed in future versions
WARNING: Extinfo objects are deprecated and will be removed in future versions
WARNING: Extinfo objects are deprecated and will be removed in future versions
WARNING: Extinfo objects are deprecated and will be removed in future versions
WARNING: Extinfo objects are deprecated and will be removed in future versions
WARNING: Extinfo objects are deprecated and will be removed in future versions
WARNING: Extinfo objects are deprecated and will be removed in future versions
WARNING: Extinfo objects are deprecated and will be removed in future versions
WARNING: Extinfo objects are deprecated and will be removed in future versions


What does this indicates and how we can solve this issue.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Error while applying configuration changes

Post by abrist »

sagarjatti wrote:i have commented serviceextinfo.cfg file inside nagios.cfg file but still we get same error
This file will just get rewritten out when apply config is run.
I have seen this issue before. Let me guess, you imported configs from a core install (including the extinfo files)?
That is ok, as long as you are comfortable losing this info, we can just truncate the table:

Code: Select all

echo "delete from nagiosql.tbl_hostextinfo; delete from nagiosql.tbl_serviceextinfo;" | mysql -pnagiosxi
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.
sagarjatti
Posts: 25
Joined: Fri Nov 02, 2012 8:25 am

Re: Error while applying configuration changes

Post by sagarjatti »

Hi Abrist,

Now i have renamed table serviceextinfo under /var/lib/mysql/nagiosql and then that error is not coming, but now another problem started. Now i can write files & verify and restart under Tools tab but not able to apply config changes and it is giving old host related error even though i have deleted that host entry in Nagios and i don't see that host entry in any of the files.

Now it gives error as below when i click apply configuration changes in CCM.

Error: Could not find any host matching '<host_name>' (config file '/usr/local/nagios/etc/services/services_TEST.cfg', starting on line 949)
Error: Failed to expand host list '<host_name>' for service '<service_name>' (/usr/local/nagios/etc/services/services_TEST.cfg:949)
sagarjatti
Posts: 25
Joined: Fri Nov 02, 2012 8:25 am

Re: Error while applying configuration changes

Post by sagarjatti »

I again tried some other way to restore the valid snapshot and again the same eror started serviceextinfo.cfg and i ran the command as you suggested but i don't think it is helpful because i can still see serviceextinfo.cfg creates when we apply configuration changes.
sagarjatti
Posts: 25
Joined: Fri Nov 02, 2012 8:25 am

Re: Error while applying configuration changes

Post by sagarjatti »

Ho to disable writing serviceextinfo.cfg file when we apply configuration changes ?
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Error while applying configuration changes

Post by abrist »

sagarjatti wrote:I again tried some other way to restore the valid snapshot and again the same error started serviceextinfo.cfg and i ran the command as you suggested but i don't think it is helpful because i can still see serviceextinfo.cfg creates when we apply configuration changes.
sagarjatti wrote:Ho to disable writing serviceextinfo.cfg file when we apply configuration changes ?
The config will still be written out by the ccm, but if you ran the delete queries in my previous post, the file should be empty. Is it empty now?

Code: Select all

cat /usr/local/nagios/etc/serviceextinfo.cfg
sagarjatti wrote:Error: Could not find any host matching '<host_name>' (config file '/usr/local/nagios/etc/services/services_TEST.cfg', starting on line 949)
Error: Failed to expand host list '<host_name>' for service '<service_name>' (/usr/local/nagios/etc/services/services_TEST.cfg:949)
This looks like an unrelated error. Try deleting all your configs and rewriting them:
Go to CCM --> Write Config Files --> Click "Delete" and then "Write" and then "Verify". If it verifies clean, go apply config. If it does not verify clean, post the errors here.
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.
sagarjatti
Posts: 25
Joined: Fri Nov 02, 2012 8:25 am

Re: Error while applying configuration changes

Post by sagarjatti »

If i click delete button in after write tab will delete all the config files in Nagios? i don't have backup of the files in Nagios server what if i lose all the data?
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: Error while applying configuration changes

Post by jdalrymple »

Most config files can be repopulated from the database after deleting them. For safety's sake you might want to grab a copy of the serviceextinfo.cfg in case it is actually providing some useful skinning in your environment, the databases cannot repopulate that file.. Otherwise there should be no harm in deleting all of the config files in your XI install using the method abrist mentioned.
sagarjatti
Posts: 25
Joined: Fri Nov 02, 2012 8:25 am

Re: Error while applying configuration changes

Post by sagarjatti »

I tried to restore previous snapshot point when it was working fine and tried to delete config files and again write-> verify-> Restart and it worked fine but again same issue when i apply configuration changes it gives error.

I observed one more thing this time when it creates serviceextinfo.cfg it is having service ID in place of "service description" field in config file as below.

define serviceextinfo {
host_name <host_name>
service_description 292

Do you know what could be the problem for this and also i get the error now as below.

Error: Could not find a service matching host name 'a<host_name>' and description '292' (config file '/usr/local/nagios/etc/serviceextinfo.cfg', starting on line 478)
Error: Could not expand services specified in extended service info (config file '/usr/local/nagios/etc/serviceextinfo.cfg', starting on line 478)
sagarjatti
Posts: 25
Joined: Fri Nov 02, 2012 8:25 am

Re: Error while applying configuration changes

Post by sagarjatti »

I also tried to delete the serviceextinfo.cfg from etc folder and then delete config files from TOols tab in GUI and write-> Verify-> Restart then apply configuration changes but it still points to same old error even though this time serviceextinfo.cfg file has no entry about that server.
Locked