Puppet Class: profile::wmcs::shinken

Defined in:
modules/profile/manifests/wmcs/shinken.pp

Overview

Parameters:

  • keystone_api_fqdn (Stdlib::Fqdn) (defaults to: lookup('profile::openstack::eqiad1::keystone_api_fqdn'))
  • keystone_port (Any) (defaults to: lookup('profile::openstack::base::keystone::public_port'))
  • puppet_enc_host (Any) (defaults to: lookup('profile::wmcs::shinken::puppet_enc_host'))
  • ircbot (Any) (defaults to: lookup('profile::wmcs::shinken::ircbot'))
  • ircbot_nick (Any) (defaults to: lookup('profile::wmcs::shinken::ircbot_nick'))
  • ircbot_server (Any) (defaults to: lookup('profile::wmcs::shinken::ircbot_server'))


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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# File 'modules/profile/manifests/wmcs/shinken.pp', line 1

class profile::wmcs::shinken(
    Stdlib::Fqdn $keystone_api_fqdn = lookup('profile::openstack::eqiad1::keystone_api_fqdn'),
    $keystone_port   = lookup('profile::openstack::base::keystone::public_port'),
    $puppet_enc_host = lookup('profile::wmcs::shinken::puppet_enc_host'),
    $ircbot          = lookup('profile::wmcs::shinken::ircbot'),
    $ircbot_nick     = lookup('profile::wmcs::shinken::ircbot_nick'),
    $ircbot_server   = lookup('profile::wmcs::shinken::ircbot_server'),
) {
    class { '::shinken':
        auth_secret       => 'This is insecure, should switch to using private repo',
        site              => $::site,
        keystone_api_fqdn => $keystone_api_fqdn,
        keystone_port     => $keystone_port,
        puppet_enc_host   => $puppet_enc_host,
    }

    #  Allow shinken to run the check_dhcp test as root.  It doesn't
    #   work as user.
    sudo::user { 'shinken_sudo_for_dhcp':
        user       => 'shinken',
        privileges => ['ALL=(root) NOPASSWD: /usr/lib/nagios/plugins/check_dhcp'],
    }

    # Basic WMCS instance & infrastructure monitoring
    shinken::config { 'basic-infra-checks':
        source => 'puppet:///modules/profile/wmcs/shinken/basic-infra-checks.cfg',
    }
    shinken::config { 'basic-instance-checks':
        source => 'puppet:///modules/profile/wmcs/shinken/basic-instance-checks.cfg',
    }

    if $ircbot {
        class { '::shinken::ircbot':
            nick   => $ircbot_nick,
            server => $ircbot_server,
        }
    }

    # toolforge specific bits
    shinken::config { 'toolforge':
        source => 'puppet:///modules/profile/wmcs/shinken/toolforge.cfg',
    }

    # beta specific bits
    shinken::config { 'beta':
        source => 'puppet:///modules/profile/wmcs/shinken/beta.cfg',
    }
}