Error while applying configuration changes
-
sagarjatti
- Posts: 25
- Joined: Fri Nov 02, 2012 8:25 am
Error while applying configuration changes
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.
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.
Re: Error while applying configuration changes
This file will just get rewritten out when apply config is run.sagarjatti wrote:i have commented serviceextinfo.cfg file inside nagios.cfg file but still we get same error
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 -pnagiosxiFormer 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.
"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
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)
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
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
Ho to disable writing serviceextinfo.cfg file when we apply configuration changes ?
Re: Error while applying configuration changes
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.
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?sagarjatti wrote:Ho to disable writing serviceextinfo.cfg file when we apply configuration changes ?
Code: Select all
cat /usr/local/nagios/etc/serviceextinfo.cfgThis looks like an unrelated error. Try deleting all your configs and rewriting them: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)
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.
"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
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
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
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)
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
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.