Commit f17052b0 authored by varac's avatar varac

added nrpe cmd and service definition

parent 1e5db13e
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',
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment