diff options
author | nadir <nadir-technik@nadir.org> | 2010-10-04 18:25:25 +0200 |
---|---|---|
committer | Gabriel Filion <lelutin@gmail.com> | 2012-04-09 21:09:30 -0400 |
commit | f722765369b3900f57d845e5c9e2e170a560302c (patch) | |
tree | b1b63465cf7e74ac555362d63959d4c1f39f55fd /manifests | |
parent | 550d098f8e9b4ac28800c8bb5db0611eb5f3fa34 (diff) |
Basic NRPE Support
amended (lelutin): removed trailing spaces and commented out code.
Diffstat (limited to 'manifests')
-rw-r--r-- | manifests/nrpe.pp | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/manifests/nrpe.pp b/manifests/nrpe.pp new file mode 100644 index 0000000..ff22441 --- /dev/null +++ b/manifests/nrpe.pp @@ -0,0 +1,37 @@ +class nagios::nrpe { + + if $nagios_nrpe_cfgdir == '' { $nagios_nrpe_cfgdir = '/etc/nagios' } + + package { "nagios-nrpe-server": ensure => latest; + "nagios-plugins-basic": ensure => latest; + "nagios-plugins-standard": ensure => latest; + "libnagios-plugin-perl": ensure => present; + "libwww-perl": ensure => present; # für check_apache + "ksh": ensure => present; # für check_cpustats.sh + "sysstat": ensure => present; # für check_cpustats.sh + } + + file { [ $nagios_nrpe_cfgdir, "$nagios_nrpe_cfgdir/nrpe.d" ]: + ensure => directory } + + file { "$nagios_nrpe_cfgdir/nrpe.cfg": + content => template('nagios/nrpe/nrpe.cfg'), + owner => root, group => root, mode => 644; + } + + # default commands + file { "$nagios_nrpe_cfgdir/nrpe.d/nrpe_commands.cfg": + source => [ "puppet:///site-nagios/nrpe/nrpe_commands.cfg", + "puppet:///nagios/nrpe/nrpe_commands.cfg" ], + owner => root, group => root, mode => 644; + } + + service { "nagios-nrpe-server": + ensure => running, + enable => true, + pattern => "nrpe", + subscribe => [ File["$nagios_nrpe_cfgdir/nrpe.cfg"], + File["$nagios_nrpe_cfgdir/nrpe.d/nrpe_commands.cfg"] ] + } + +} |