Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to exclude the first service within a service escalation #385

Open
nook24 opened this issue May 3, 2022 · 1 comment
Open

Unable to exclude the first service within a service escalation #385

nook24 opened this issue May 3, 2022 · 1 comment

Comments

@nook24
Copy link
Member

nook24 commented May 3, 2022

Hi folks,

I noticed an issue with the parsing of service escalations. If I exclude the first service (first define service in the config files) from a service escalation, the Naemon config validation will fail with

Error: Service escalation host name or description is NULL
Error: Could not register service escalation (config file '/opt/naemon/etc/config/test.cfg', starting on line 184)
   Error processing object config files!

It is possible to "resolve" the issue, by simply moving the define service block in the config files.
I have created a config file, which shows my issue: https://gist.github.com/nook24/7f6be82ac51c62750a928bfb33a89fdf

@roelvanmeer
Copy link
Contributor

Hi! I've looked at this a bit. As far as I can see, "!CHECK_PING_1" expands into this list:
CHECK_PING_4, CHECK_PING_3, CHECK_PING_2, CHECK_PING
The last item in that list is the template of the service definition, which does not have a host_name set, which triggers the error.
I haven't gotten any further though, because the list expansion code isn't easily digestible.. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants