Nagios Config Error after define service escalation

An open discussion forum for obtaining help with Nagios Core. Nagios Core users of all experience levels are welcome here. Subforum have been created for the discussion of Nagios Core and Nagios Plugin development.

NOTE: The SourceForge.net mailing lists have been deprecated in favor of this forum in order to expedite support and provide additional features not available on the old mailing list.

Nagios Config Error after define service escalation

Postby ttsvetanov » Tue Jun 26, 2018 9:07 am

Hi to all!
I have the following defined service escalation:

define hostescalation{
# host_name host_name
hostgroup_name my_group
# contacts contacts
contact_groups test_escalation
first_notification 3
last_notification 6
notification_interval 30
# escalation_period timeperiod_name
# escalation_options [d,u,r]
}

define serviceescalation{
# hostgroup_name my_service_group
hostgroup_name my_group
service_description PI Video , PING
contact_groups test_escalation
first_notification 3
last_notification 6
notification_interval 30
}

define servicegroup{
servicegroup_name my_service_group
alias alias
# members services
# servicegroup_members servicegroups
# notes note_string
# notes_url url
# action_url url
}


And the following service define:

define service{
use test_pi_service
hostgroup_name my_group_group
host_name !random_host
service_description PI Video
check_command check_raspi_v1.01
max_check_attempts 5
normal_check_interval 5
retry_check_interval 5
notifications_enabled 1
servicegroups my_service_group
}


The problem is when i define the service escallation, it returns me the following error:
Reading configuration data...
Read main config file okay...
Error: Could not find a service matching host name 'pb-153-1_10.22.66.10' and description 'PI Video' (config file '/usr/local/nagios/etc/under_support/myconfig.cfg', starting on line 78)
Error processing object config files!


This happened when i decided to exclude some hosts from service check with "!" in host_name of service definition. When i comment the service escalation is working fine.
Any advice? Thank you.
Last edited by ttsvetanov on Tue Jun 26, 2018 9:42 am, edited 1 time in total.
ttsvetanov
 
Posts: 4
Joined: Tue Jun 26, 2018 8:46 am

Re: Nagios Config Error after define service escalation

Postby scottwilkerson » Tue Jun 26, 2018 9:12 am

EDIT: The below was copied before the post above was edited

My guess is that the hostgroup in this definition contains the host pb-153-1_10.22.66.10
ttsvetanov wrote:
Code: Select all
define serviceescalation{
# hostgroup_name my_service_group
hostgroup_name my_group
service_description PI Video , PING
contact_groups parallel_escalation
first_notification 3
last_notification 6
notification_interval 30
}


but your service definition excluded that host
ttsvetanov wrote:
Code: Select all
define service{
use postbank_pi_service
hostgroup_name 5_postbank_group
host_name !pb-153-1_10.22.66.10
service_description PI Video
check_command check_raspi_v1.01
max_check_attempts 5
normal_check_interval 5
retry_check_interval 5
notifications_enabled 1
servicegroups postbank_service_group
}


So you have an escalation for a host/service combination that doesn't exist
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
DevOps Engineer
 
Posts: 12248
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: Nagios Config Error after define service escalation

Postby ttsvetanov » Wed Jul 04, 2018 6:50 am

Yes, maybe this is the problem, so is there an solution for this? I just dont want for all devices this service check. They are 200+, so the easiest way is to define service for hostgroup instead defining hosts one by one. That's why i want to use excluding(because they are 10-15 devices).
ttsvetanov
 
Posts: 4
Joined: Tue Jun 26, 2018 8:46 am

Re: Nagios Config Error after define service escalation

Postby scottwilkerson » Thu Jul 05, 2018 9:34 am

I'm pretty sure you can add the exclusion to the serviceescalation definition too
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
DevOps Engineer
 
Posts: 12248
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: Nagios Config Error after define service escalation

Postby ttsvetanov » Fri Jul 06, 2018 1:41 am

Yes, this is the solution :) Thank you so much!
ttsvetanov
 
Posts: 4
Joined: Tue Jun 26, 2018 8:46 am

Re: Nagios Config Error after define service escalation

Postby tmcdonald » Fri Jul 06, 2018 9:17 am

Glad to hear it! Did you have further (related) questions or are we good to lock this up?
Former Nagios employee
tmcdonald
 
Posts: 9118
Joined: Mon Sep 23, 2013 8:40 am

Re: Nagios Config Error after define service escalation

Postby ttsvetanov » Mon Jul 09, 2018 1:22 am

No, i don't have any related questions for now, it's ok to lock it up.
ttsvetanov
 
Posts: 4
Joined: Tue Jun 26, 2018 8:46 am


Return to Nagios Core

Who is online

Users browsing this forum: Adeiko and 25 guests