summaryrefslogtreecommitdiff
path: root/manifests/extra_host.pp
blob: 7e37d3eadf864b173db81875f74a84c63406f211 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# this will define a host which isn't managed by puppet. 
# a ping serivce is automatically added
define nagios::extra_host(
    $ensure = present,
    $ip,
    $nagios_alias,
    $use = 'generic-host',
    $parents = 'localhost'
) {
    nagios::host{$name:
        ensure => $ensure,
        ip => $ip,
        nagios_alias => $nagios_alias,
        use => $use,
        parents => $parents
    }

    nagios::service { "check_ping_${name}":
        ensure => $ensure,
        host_name => $name,
        check_command => 'check_ping!100.0,20%!500.0,60%',
        host_name => $name,
        service_description => "check_ping_${nagios_alias}",
   }
}