Having issues with host and service escalations sending via sms.
Original set up: host and service notifications are being sent via e-mail just fine - the way I want - 24x7.
Objective: based on current configuration - configure escalations to be notified by sms outside of working hours (nights, weekends) for just specific hosts/service group, not all of them.
Current status:
Configured host escalations with separate contact/contact_group to notify myself only via sms and keep sending e-mails to admins all the time.
E-mails work, but the escalation configuration doesn't seem to grab a hostgroup I want to be notified about (routers). It does send sms-es for all hosts and all host_groups instead. And also it picks the escalation option (hardstate) for all (down,recovery,unknown...), and I have escalations configured for down/recovery only.
Basically it escalates it all, whatever is set in host.cfg.
Relevant config below:
Briefly:
E-mail: I need notifications for all hosts and groups (works fine)
SMS: I just need escalations for routers only and for up/down state (currently sends for all hosts, host_groups and all hard states - up,down,unknown...)
hosts.cfg (template)
Code: Select all
define host {
name generic-host
[b]register[/b] 0
check_command check-host-alive
max_check_attempts 3
notification_interval 0
notification_period 24x7
notification_options d,u,r
contact_groups admins, myself
my_server.cfg (real host)
Code: Select all
define host {
use generic-host
host_name my_server
address server_ip_address
hostgroups servers
}
Code: Select all
define host {
use generic-host
host_name my_router
address router_ip_address
hostgroups routers
}
Code: Select all
define hostescalation{
hostgroup_name [b]routers[/b]
first_notification 1
last_notification 1
notification_interval 1
contact_groups [b]myself[/b]
escalation_period 24x7
escalation_options [b]d,r[/b] #different from the host template
}
Code: Select all
define contact{
contact_name admins
service_notification_period 24x7
host_notification_period 24x7
service_notification_options w,u,c,r
host_notification_options d,u,r
service_notification_commands notify-by-email
host_notification_commands host-notify-by-email
email admins@domain.com
}
contact_name myself
service_notification_period weekends
host_notification_period weekends
service_notification_options u,c
host_notification_options d,r
service_notification_commands notify-by-sms
host_notification_commands host-notify-by-sms
email myself@domain.com
pager my_phone#
}
-----
Overview:
I my understanding it should go as follows:
* host is being monitored 24x7 (as hostss.cfg states)
* host down (check_host_alive comamnd)
* admins being notified via e-mail (as per contact.cfg - 24x7)
* 'myself' notified via sms (only in case if: related to routers, host down or up, only during nigh and weekend)
But with this configuration I am in fact notified during night and weekends only but for all host groups and with all up/down/unknown states.
If I perform on the fly config check it shows that indeed escalations are configured with the number of hosts I want:
Code: Select all
Running pre-flight check on configuration data...
Checking service escalations...
Checked 38 service escalations.
Checking host escalations...
Checked 40 host escalations.
hostescalation.cfg
Code: Select all
define hostescalation{
hostgroup_name [b]routers, servers[/b]
first_notification 1
last_notification 1
notification_interval 1
contact_groups [b]myself[/b]
escalation_period 24x7
escalation_options [b]d,r[/b] #different from the host template
}
Code: Select all
Running pre-flight check on configuration data...
Checking service escalations...
Checked 38 service escalations.
Checking host escalations...
Checked 80 host escalations.
Am I missing something?
Appreciate.