Hello,
Previously have used this template in a lot of places, but I have a few cases where my services don't appear to be working:
Attached Files -
test_service_template.cfg - Service Template
test_service.cfg - Service
Error: notification_period '' for service 'CPU' on host 'redacted' could not be found!
Error: Could not register service (config file '/usr/local/nagios/etc/services/hg0-mgicint-linux-ts.cfg', starting on line 16)
The notification period is defined in the template, and on the "service template" tab of the service I have selected the Test template.
Curious what I am missing here. Also, if I am correct in my thinking, anything we define on the service itself (more specific parameters) will override anything inherited from the template.
Thanks for any insight!
Service Not Inheriting from Service Template
-
MikeMAN987
- Posts: 58
- Joined: Fri Sep 29, 2017 9:57 am
Service Not Inheriting from Service Template
You do not have the required permissions to view the files attached to this post.
Re: Service Not Inheriting from Service Template
What is happening it that for the service, the notification_period option is defined in the check but it does not have a period set.
When you setup an option in the object (The Service Check) even though it is blank, it will not inherit the settings from the template and that is causing your errors.
What you need to do is to edit the service checks and remove the notification_period from the services that are blank which will allow the template to set that option through inheritance.
When you setup an option in the object (The Service Check) even though it is blank, it will not inherit the settings from the template and that is causing your errors.
What you need to do is to edit the service checks and remove the notification_period from the services that are blank which will allow the template to set that option through inheritance.
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
MikeMAN987
- Posts: 58
- Joined: Fri Sep 29, 2017 9:57 am
Re: Service Not Inheriting from Service Template
Thanks for the insight. I suspected that was the case (mostly because the error message says that), however when managing these configurations through the GUI, how can I update these settings to be "truly" blank? right now the GUI shows no notification period, yet the .cfg file shows the setting but without a value.
Regards,
Mike
Regards,
Mike
Re: Service Not Inheriting from Service Template
I would guess that there was an issue what the checks were created or edited and those options did not get set.
Try this, In the Core Config Manager, edit those services and add a Notification Period. Save it. Then remove it and Save it.
Are they gone then?
Try this, In the Core Config Manager, edit those services and add a Notification Period. Save it. Then remove it and Save it.
Are they gone then?
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
MikeMAN987
- Posts: 58
- Joined: Fri Sep 29, 2017 9:57 am
Re: Service Not Inheriting from Service Template
That worked great, thank you very much! ( I used the bulk modification tool to add a check period and then remove the same one)
Re: Service Not Inheriting from Service Template
Your welcome. Glad it worked. Let us know if you have any further questions or that it is OK to close and lock the post as solved.
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
MikeMAN987
- Posts: 58
- Joined: Fri Sep 29, 2017 9:57 am
Re: Service Not Inheriting from Service Template
Feel free to close/lock. Thank you again!