summaryrefslogtreecommitdiff
path: root/puppet/modules/site_nagios/manifests/add_service.pp
blob: 6ef3cbf5e4e0c28c6c135278462320277863f29b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
define site_nagios::add_service (
  $hostname, $ip_address, $openvpn_gw = '', $service) {

  case $service {
    'webapp': {
      $check_command       = 'check_https_cert'
      $service_description = 'Website Certificate'
    }
    default:  {
      #notice ("No Nagios service check for service \"$service\"")
    }
  }

  if ( $check_command != '' ) {
    nagios_service { $name:
      use                 => 'generic-service',
      check_command       => $check_command,
      service_description => $service_description,
      host_name           => $hostname }
  }
}