aboutsummaryrefslogtreecommitdiff
path: root/manifests/defines/munin_node.pp
blob: ecbc56fc95e3e9cddfb12eee2da6d9cec3fa0054 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# Define a munin node
define munin_node(
  $port          = hiera('nodo::munin_node::port',   '4949'),
  $allow         = hiera('nodo::munin_node::allow',  ''),
  $host          = hiera('nodo::munin_node::host',    $::fqdn),
  $listen        = hiera('nodo::munin_node::listen', '*'),
  $load_warning  = hiera('nodo::munin_node::load_warning',  '5'),
  $load_critical = hiera('nodo::munin_node::load_critical', '10')
) {

  case $allow {
    '': { fail("Please set nodo::munin_node::allow in your config") }
  }

  class { 'munin::client':
    port   => $port,
    allow  => $allow,
    host   => $host,
    listen => $listen,
  }

  munin::plugin { apt_all: ensure => present; }
}