summaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authornadir <nadir-technik@nadir.org>2012-10-27 10:09:19 +0200
committervarac <varacanero@zeromail.org>2015-12-05 20:23:58 +0100
commit993b624bd14dc5ef88847b11abc06d2b708c23b6 (patch)
treee21bf04c4ac760ccabcc5648d9a24b277c668b0d /manifests
parentd4992d7307e71ebdf4effb0439177e68ce8a415a (diff)
Lint nagios::nrpe::base
Diffstat (limited to 'manifests')
-rw-r--r--manifests/nrpe/base.pp55
1 files changed, 29 insertions, 26 deletions
diff --git a/manifests/nrpe/base.pp b/manifests/nrpe/base.pp
index 17abb04..7bfa27e 100644
--- a/manifests/nrpe/base.pp
+++ b/manifests/nrpe/base.pp
@@ -1,32 +1,34 @@
+# install nrpe-server
class nagios::nrpe::base {
if $nagios_nrpe_cfgdir == '' { $nagios_nrpe_cfgdir = '/etc/nagios' }
if $processorcount == '' { $processorcount = 1 }
-
- package { "nagios-nrpe-server": ensure => present;
- "nagios-plugins-basic": ensure => present;
- "libwww-perl": ensure => present; # for check_apache
- }
+
+ package {
+ 'nagios-nrpe-server': ensure => present;
+ 'nagios-plugins-basic': ensure => present;
+ 'libwww-perl': ensure => present; # for check_apache
+ }
# Special-case lenny. the package doesn't exist
- if $lsbdistcodename != 'lenny' {
- package { "libnagios-plugin-perl": ensure => present; }
+ if $::lsbdistcodename != 'lenny' {
+ package { 'libnagios-plugin-perl': ensure => present; }
}
-
- file { [ $nagios_nrpe_cfgdir, "$nagios_nrpe_cfgdir/nrpe.d" ]:
- ensure => directory }
+
+ file { [ $nagios_nrpe_cfgdir, "${nagios_nrpe_cfgdir}/nrpe.d" ]:
+ ensure => directory }
if $nagios_nrpe_dont_blame == '' { $nagios_nrpe_dont_blame = 1 }
- file { "$nagios_nrpe_cfgdir/nrpe.cfg":
- content => template('nagios/nrpe/nrpe.cfg'),
- owner => root, group => 0, mode => 644;
+ file { "${nagios_nrpe_cfgdir}/nrpe.cfg":
+ content => template('nagios/nrpe/nrpe.cfg'),
+ owner => root, group => 0, mode => '0644';
}
-
+
# default commands
- nagios::nrpe::command { "basic_nrpe":
- source => [ "puppet:///modules/site-nagios/configs/nrpe/nrpe_commands.${fqdn}.cfg",
- "puppet:///modules/site-nagios/configs/nrpe/nrpe_commands.cfg",
- "puppet:///modules/nagios/nrpe/nrpe_commands.cfg" ],
+ nagios::nrpe::command { 'basic_nrpe':
+ source => [ "puppet:///modules/site-nagios/configs/nrpe/nrpe_commands.${::fqdn}.cfg",
+ 'puppet:///modules/site-nagios/configs/nrpe/nrpe_commands.cfg',
+ 'puppet:///modules/nagios/nrpe/nrpe_commands.cfg' ],
}
# the check for load should be customized for each server based on number
# of CPUs and the type of activity.
@@ -36,15 +38,16 @@ class nagios::nrpe::base {
$critical_1_threshold = 10 * $processorcount
$critical_5_threshold = 9 * $processorcount
$critical_15_threshold = 8 * $processorcount
- nagios::nrpe::command { "check_load":
- command_line => "${nagios_plugin_dir}/check_load -w ${warning_1_threshold},${warning_5_threshold},${warning_15_threshold} -c ${critical_1_threshold},${critical_5_threshold},${critical_15_threshold}",
+ nagios::nrpe::command { 'check_load':
+ command_line => "${nagios_plugin_dir}/check_load -w ${warning_1_threshold},${warning_5_threshold},${warning_15_threshold} -c ${critical_1_threshold},${critical_5_threshold},${critical_15_threshold}",
}
- service { "nagios-nrpe-server":
- ensure => running,
- enable => true,
- pattern => "nrpe",
- subscribe => File["$nagios_nrpe_cfgdir/nrpe.cfg"],
- require => Package["nagios-nrpe-server"],
+ service { 'nagios-nrpe-server':
+ ensure => running,
+ enable => true,
+ pattern => 'nrpe',
+ hasstatus => false,
+ subscribe => File["${nagios_nrpe_cfgdir}/nrpe.cfg"],
+ require => Package['nagios-nrpe-server'],
}
}