diff options
author | varac <varacanero@zeromail.org> | 2013-01-24 13:32:00 +0100 |
---|---|---|
committer | varac <varacanero@zeromail.org> | 2013-01-24 13:32:00 +0100 |
commit | f17052b041c183cfb765ae423f29143ed85142d6 (patch) | |
tree | 9dad7f14c8ca20b3f8b40ac25abd2d0f9bf8a64e | |
parent | 1e5db13e9c103b93fcdbd3983099c734358f524c (diff) | |
download | puppet-backupninja-f17052b041c183cfb765ae423f29143ed85142d6.tar.gz puppet-backupninja-f17052b041c183cfb765ae423f29143ed85142d6.tar.bz2 |
added nrpe cmd and service definition
-rw-r--r-- | manifests/nagios_plugin/duplicity.pp | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/manifests/nagios_plugin/duplicity.pp b/manifests/nagios_plugin/duplicity.pp index 93b0989..5280136 100644 --- a/manifests/nagios_plugin/duplicity.pp +++ b/manifests/nagios_plugin/duplicity.pp @@ -1,13 +1,16 @@ class backupninja::nagios_plugin::duplicity { - case ::operatingsystem { + case $::operatingsystem { 'Debian': { package { 'python-argparse': ensure => installed, } } 'Ubuntu': { package { 'python-argh': ensure => installed, } } default: { notify {'Backupninja-Duplicity Nagios check needs python-argparse to be installed !':} } } - nagios::plugin { 'check_backupninja_duplicity.py': - source => 'backupninja/nagios_plugins/duplicity/check_backupninja_duplicity.py' + file { '/usr/lib/nagios/plugins/check_backupninja_duplicity.py': + source => 'puppet:///modules/backupninja/nagios_plugins/duplicity/check_backupninja_duplicity.py', + mode => '0755', + owner => 'nagios', + group => 'nagios', } # deploy helper script @@ -18,5 +21,17 @@ class backupninja::nagios_plugin::duplicity { group => 'nagios', } -} + nagios::nrpe::command { 'check_backupninja_duplicity': + command_line => "${::nagios::nrpe::nagios_plugin_dir}/check_backupninja_duplicity" + } + nagios::service { 'Backupninja Duplicity': + use_nrpe => true, + check_command => 'check_backupninja_duplicity', + nrpe_timeout => '60', + # check only twice a day + normal_check_interval => '720', + # recheck every hour + retry_check_interval => '60', + } +} |