diff options
author | Linus Nordberg <linus@nordu.net> | 2017-07-28 19:28:21 +0200 |
---|---|---|
committer | Linus Nordberg <linus@nordu.net> | 2017-07-28 19:28:21 +0200 |
commit | 0c5faec0d8dc1581bbd62359094d4df9fa0656d1 (patch) | |
tree | 5698b595e74c044a3506c2f2c2c6f88a2bc27061 /global/overlay | |
parent | 9f7d25efd888fa4940182cd13ad9a2c26ab079be (diff) |
Move class nrpe into cosmos-site.pp.ct-ops-2017-07-28-v13
include nrpe doesn't seem to create class ::nrpe.
Diffstat (limited to 'global/overlay')
-rw-r--r-- | global/overlay/etc/puppet/manifests/cosmos-site.pp | 34 | ||||
-rw-r--r-- | global/overlay/etc/puppet/manifests/nrpe.pp | 28 |
2 files changed, 32 insertions, 30 deletions
diff --git a/global/overlay/etc/puppet/manifests/cosmos-site.pp b/global/overlay/etc/puppet/manifests/cosmos-site.pp index cc37912..edf5c1d 100644 --- a/global/overlay/etc/puppet/manifests/cosmos-site.pp +++ b/global/overlay/etc/puppet/manifests/cosmos-site.pp @@ -4,8 +4,6 @@ Exec { path => "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", } -include nrpe - class nunoc { include sunet::tools include sunet::motd @@ -40,6 +38,38 @@ class ctops { } } +class nrpe { + require apt + class {'sunet::nagios': } + if ($::operatingsystem == 'Ubuntu' and $::operatingsystemrelease == '12.04') { + class {'apt::backports': } + } + package {'nagios-plugins-contrib': ensure => latest} + package {'nagios-plugins-extra': ensure => latest} + + sunet::nagios::nrpe_command {'check_memory': + command_line => '/usr/lib/nagios/plugins/check_memory -w 10% -c 5%' + } + sunet::nagios::nrpe_command {'check_mem': + command_line => '/usr/lib/nagios/plugins/check_memory -w 10% -c 5%' + } + sunet::nagios::nrpe_command {'check_boot_15_5': + command_line => '/usr/lib/nagios/plugins/check_disk -w 15% -c 5% -p /boot' + } + sunet::nagios::nrpe_command {'check_entropy': + command_line => '/usr/lib/nagios/plugins/check_entropy' + } + sunet::nagios::nrpe_command {'check_ntp_time': + command_line => '/usr/lib/nagios/plugins/check_ntp_time -H localhost' + } + sunet::nagios::nrpe_command {'check_scriptherder': + command_line => '/usr/local/bin/scriptherder --mode check' + } + sunet::nagios::nrpe_command {'check_apt': + command_line => '/usr/lib/nagios/plugins/check_apt' + } +} + node 'f1.ct.nordu.net' { sunet::cloudimage { 'frontend-1.urd.appendto.org': dhcp => false, diff --git a/global/overlay/etc/puppet/manifests/nrpe.pp b/global/overlay/etc/puppet/manifests/nrpe.pp deleted file mode 100644 index e85a926..0000000 --- a/global/overlay/etc/puppet/manifests/nrpe.pp +++ /dev/null @@ -1,28 +0,0 @@ -class nrpe { - require apt - class {'sunet::nagios': } - package {'nagios-plugins-contrib': ensure => latest} - package {'nagios-plugins-extra': ensure => latest} - - sunet::nagios::nrpe_command {'check_memory': - command_line => '/usr/lib/nagios/plugins/check_memory -w 10% -c 5%' - } - sunet::nagios::nrpe_command {'check_mem': - command_line => '/usr/lib/nagios/plugins/check_memory -w 10% -c 5%' - } - sunet::nagios::nrpe_command {'check_boot_15_5': - command_line => '/usr/lib/nagios/plugins/check_disk -w 15% -c 5% -p /boot' - } - sunet::nagios::nrpe_command {'check_entropy': - command_line => '/usr/lib/nagios/plugins/check_entropy' - } - sunet::nagios::nrpe_command {'check_ntp_time': - command_line => '/usr/lib/nagios/plugins/check_ntp_time -H localhost' - } - sunet::nagios::nrpe_command {'check_scriptherder': - command_line => '/usr/local/bin/scriptherder --mode check' - } - sunet::nagios::nrpe_command {'check_apt': - command_line => '/usr/lib/nagios/plugins/check_apt' - } -} |