Hi,
Boomark this page as it has all the definitions of all the object types:
https://assets.nagios.com/downloads/nag ... tions.html
Looking at the notification options for a host:
notification_options:
This directive is used to determine when notifications for the host should be sent out. Valid options are a combination of one or more of the following:
d = send notifications on a DOWN state
u = send notifications on an UNREACHABLE state
r = send notifications on recoveries (OK state)
f = send notifications when the host starts and stops flapping
s = send notifications when scheduled downtime starts and ends.
If you specify n (none) as an option, no host notifications will be sent out. If you do not specify any notification options, Nagios will assume that you want notifications to be sent out for all possible states. Example: If you specify d,r in this field, notifications will only be sent out when the host goes DOWN and when it recovers from a DOWN state.
So the notifications for a host are not the same as the notifications for a service.
Notifications for a host simply tell whether the host is up, down, flapping or has recovered.
Service notifications only tell you about the state of the
service, not the host.
You may need to re-think your service configuration and you may possibly need two separate services, one for your 24x7 alerting hosts and a separate one for your business hours only hosts:
24x7 disk check
define service {
host_name host1,host2,host3,host4
service_description check-disk-sda1
check_command check-disk!/dev/sda1
max_check_attempts 5
check_interval 5
retry_interval 3
check_period 24x7
notification_interval 30
notification_period 24x7
notification_options w,c,r
contact_groups linux-admins
}
business hours only disk check
define service {
host_name host5,host6,host7,host8
service_description check-disk-sda1
check_command check-disk!/dev/sda1
max_check_attempts 5
check_interval 5
retry_interval 3
check_period workhours
notification_interval 30
notification_period workhours
notification_options w,c,r
contact_groups linux-admins
}
You could do this fairly quickly by creating two hostgroups:
24x7_hosts
buisiness_hours_hosts
and add in your hosts to each host group and then assign the relevant hostgroup to the correct services as I created above instead of specifying hosts.
If a customer has 24x7 support then it would be assumed that their servers would require 24x7 monitoring on all services on all their servers and a business hours only support customer would only need business hour alerting on all the services on their servers.
Its all about how you want to configure your config files and how you write your hosts/services