Service Not Inheriting from Service Template

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
MikeMAN987
Posts: 58
Joined: Fri Sep 29, 2017 9:57 am

Service Not Inheriting from Service Template

Post by MikeMAN987 »

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!
You do not have the required permissions to view the files attached to this post.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Service Not Inheriting from Service Template

Post by tgriep »

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.
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

Post by MikeMAN987 »

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
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Service Not Inheriting from Service Template

Post by tgriep »

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?
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

Post by MikeMAN987 »

That worked great, thank you very much! ( I used the bulk modification tool to add a check period and then remove the same one)
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Service Not Inheriting from Service Template

Post by tgriep »

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

Post by MikeMAN987 »

Feel free to close/lock. Thank you again!
Locked