Nagios Config Error after define service escalation
Posted: 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.
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.