summaryrefslogtreecommitdiff
path: root/puppet/modules/site_nagios/manifests/server/add_contacts.pp
blob: b5c6f0a5e8610c88e8bff7363585201afcfff10c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# configure a nagios_contact
define site_nagios::server::add_contacts ($contact_emails) {

  $environment = $name

  nagios_contact {
    $environment:
      alias                         => $environment,
      service_notification_period   => '24x7',
      host_notification_period      => '24x7',
      service_notification_options  => 'w,u,c,r',
      host_notification_options     => 'd,r',
      service_notification_commands => 'notify-service-by-email',
      host_notification_commands    => 'notify-host-by-email',
      email                         => join($contact_emails, ', '),
      require                       => Package['nagios']
  }
}