Hi,
I've recently updated to Nagios XI V2014 R2.3 and since updating I can no longer apply configuration. The error reported in post flight checks is as below:
Error: Could not find a service matching host name 'X' and description 'MSSQL Query - XYZ' (config file '/usr/local/nagios/etc/serviceescalations.cfg', starting on line 14)
Error: Could not expand services specified in service escalation (config file '/usr/local/nagios/etc/serviceescalations.cfg', starting on line 14)
I took a look at "serviceescalations.cfg" and there is currently nothing in here.
###############################################################################
#
# Service escalations configuration file
#
# Created by: Nagios Core Config Manager 2.3.0
# Date: 2015-01-23 16:58:52
# Version: Nagios 3.x config file
#
# --- DO NOT EDIT THIS FILE BY HAND ---
# Nagios CCM will overwrite all manual settings during the next update if you
# would like to edit files manually, place them in the 'static' directory or
# import your configs into the CCM by placing them in the 'import' directory.
#
###############################################################################
###############################################################################
#
# Service escalations configuration file
#
# END OF FILE
#
###############################################################################
Permissions on the file appear to be ok:
[root@aunagiosxi ~]# ls -l /usr/local/nagios/etc/ser*.cfg
-rw-r--r-- 1 apache nagios 823 Jan 23 16:58 /usr/local/nagios/etc/servicedependencies.cfg
-rw-r--r-- 1 apache nagios 825 Jan 23 16:58 /usr/local/nagios/etc/serviceescalations.cfg
-rw-r--r-- 1 apache nagios 843 Jan 23 16:58 /usr/local/nagios/etc/serviceextinfo.cfg
-rw-r--r-- 1 apache nagios 3208 Jan 23 16:58 /usr/local/nagios/etc/servicegroups.cfg
-rw-r--r-- 1 apache nagios 16143 Jan 23 16:58 /usr/local/nagios/etc/servicetemplates.cfg
What's also confusing me is that I removed the config for host 'X' a while ago and 'MSSQL Query - XYZ' was never attributed to this host. So I can't understand why the service escalation is complaining about this? I checked all of my service escalations and the host does not exist in here. I've also tried using other peoples forums posts to assist but I can't seem to resolve the issue.
Can you please provide any advice on how I can fix this issue and apply my new configuration?
Could not expand services specified in service escalataions
Could not expand services specified in service escalataions
Last edited by dbsaust on Fri May 08, 2015 10:05 am, edited 1 time in total.
Re: Could not expand services specified in service escalatai
Try this.
Go to the Core Config Manager
Under "Tools", click "Write Config Files"
Click the "Delete" button then click the "Write" button and then the "Verify" button
Click Apply Configuration and click the "Apply Configuration" button
If that fails, run this and post is back here.
Go to the Core Config Manager
Under "Tools", click "Write Config Files"
Click the "Delete" button then click the "Write" button and then the "Verify" button
Click Apply Configuration and click the "Apply Configuration" button
If that fails, run this and post is back here.
Code: Select all
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfgBe sure to check out our Knowledgebase for helpful articles and solutions!
Re: Could not expand services specified in service escalatai
Hi tgriep, unfortunately I still get the same issue after following your instructions. Here is the output as requested:
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
Nagios Core 4.0.8
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 08-12-2014
License: GPL
Website: http://www.nagios.org
Reading configuration data...
Read main config file okay...
Read object config files okay...
Running pre-flight check on configuration data...
Checking objects...
Warning: Service 'MacServer_PROD' on host 'A' has no default contacts or contactgroups defined!
Warning: Service 'MacServer_TEST' on host 'B' has no default contacts or contactgroups defined!
Warning: Service 'InetD' on host 'C' has no default contacts or contactgroups defined!
Warning: Service 'Monitor AU' on host 'D' has a notification interval less than its check interval! Notifications are only re-sent after checks are made, so the effective notification interval will be that of the check interval.
Warning: Service 'Monitor NZ' on host 'D' has a notification interval less than its check interval! Notifications are only re-sent after checks are made, so the effective notification interval will be that of the check interval.
Checked 991 services.
Checked 170 hosts.
Checked 22 host groups.
Checked 15 service groups.
Checked 53 contacts.
Checked 34 contact groups.
Checked 94 commands.
Checked 119 time periods.
Checked 0 host escalations.
Checked 0 service escalations.
Checking for circular paths...
Checked 170 hosts
Checked 0 service dependencies
Checked 0 host dependencies
Checked 119 timeperiods
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...
Total Warnings: 5
Total Errors: 0
Things look okay - No serious problems were detected during the pre-flight check
[root@aunagiosxi ~]#
The original error still appears to be present in the error log after applying configuration also:
Error: Could not find a service matching host name 'X' and description 'MSSQL Query - XYZ' (config file '/usr/local/nagios/etc/serviceescalations.cfg', starting on line 14)
Error: Could not expand services specified in service escalation (config file '/usr/local/nagios/etc/serviceescalations.cfg', starting on line 14)
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
Nagios Core 4.0.8
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 08-12-2014
License: GPL
Website: http://www.nagios.org
Reading configuration data...
Read main config file okay...
Read object config files okay...
Running pre-flight check on configuration data...
Checking objects...
Warning: Service 'MacServer_PROD' on host 'A' has no default contacts or contactgroups defined!
Warning: Service 'MacServer_TEST' on host 'B' has no default contacts or contactgroups defined!
Warning: Service 'InetD' on host 'C' has no default contacts or contactgroups defined!
Warning: Service 'Monitor AU' on host 'D' has a notification interval less than its check interval! Notifications are only re-sent after checks are made, so the effective notification interval will be that of the check interval.
Warning: Service 'Monitor NZ' on host 'D' has a notification interval less than its check interval! Notifications are only re-sent after checks are made, so the effective notification interval will be that of the check interval.
Checked 991 services.
Checked 170 hosts.
Checked 22 host groups.
Checked 15 service groups.
Checked 53 contacts.
Checked 34 contact groups.
Checked 94 commands.
Checked 119 time periods.
Checked 0 host escalations.
Checked 0 service escalations.
Checking for circular paths...
Checked 170 hosts
Checked 0 service dependencies
Checked 0 host dependencies
Checked 119 timeperiods
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...
Total Warnings: 5
Total Errors: 0
Things look okay - No serious problems were detected during the pre-flight check
[root@aunagiosxi ~]#
The original error still appears to be present in the error log after applying configuration also:
Error: Could not find a service matching host name 'X' and description 'MSSQL Query - XYZ' (config file '/usr/local/nagios/etc/serviceescalations.cfg', starting on line 14)
Error: Could not expand services specified in service escalation (config file '/usr/local/nagios/etc/serviceescalations.cfg', starting on line 14)
Re: Could not expand services specified in service escalatai
This was due to a bug. I can help you patch the bug if you want, or better yet, just upgrade to 2014r2.5.
To patch:
Edit:
Change line # 44 from:
To:
Save out. Apply config should now work as expected once again.
To patch:
Edit:
Code: Select all
/usr/local/nagiosxi/scripts/restart_nagios_with_export.shCode: Select all
sudo ./manage_services.sh restart nagiosCode: Select all
./manage_services.sh restart nagiosFormer 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.
Re: Could not expand services specified in service escalatai
Hi abrist,
I tried to fix the script but that failed with an error, so I upgraded to 2014r2.5 instead and that seems to now let me apply configuration without the error I found previously.
I'll let you know if anything further causes an issue in application of config - many thanks!
I tried to fix the script but that failed with an error, so I upgraded to 2014r2.5 instead and that seems to now let me apply configuration without the error I found previously.
I'll let you know if anything further causes an issue in application of config - many thanks!
Re: Could not expand services specified in service escalatai
Sounds good!
We will keep this open for a bit in case you have any (related) issues.
We will keep this open for a bit in case you have any (related) issues.
Former Nagios employee