Commit 47733659 authored by Micah Anderson's avatar Micah Anderson

let the user override the nagios2_description, which is necessary for

multiple backup defines on one host
parent 198b84bf
......@@ -25,7 +25,7 @@ define backupninja::rdiff(
"/home", "/usr/local/*bin", "/var/lib/dpkg/status*" ],
$vsinclude = false, $keep = 30, $sshoptions = false, $options = '--force', $ssh_dir_manage = true,
$ssh_dir = false, $authorized_keys_file = false, $installuser = true, $installkey = true, $key = false,
$backuptag = false, $home = false, $backupkeytype = "rsa", $backupkeystore = false, $extras = false)
$backuptag = false, $home = false, $backupkeytype = "rsa", $backupkeystore = false, $extras = false, $nagios2_description = 'backups')
{
include backupninja::client::rdiff_backup
......@@ -49,6 +49,7 @@ define backupninja::rdiff(
manage_ssh_dir => $ssh_dir_manage, ssh_dir => $ssh_dir, key => $key,
authorized_keys_file => $authorized_keys_file, installuser => $installuser,
backuptag => $real_backuptag, keytype => $backupkeytype, backupkeys => $backupkeystore,
nagios2_description => $nagios2_description
}
backupninja::client::key
......
......@@ -62,7 +62,7 @@ class backupninja::server {
define sandbox(
$user = false, $host = false, $installuser = true, $dir = false, $manage_ssh_dir = true,
$ssh_dir = false, $authorized_keys_file = false, $key = false, $keytype = 'dss', $backupkeys = false, $uid = false,
$gid = "backupninjas", $backuptag = false)
$gid = "backupninjas", $backuptag = false, $nagios2_description = "backups")
{
$real_user = $user ? {
......@@ -95,9 +95,14 @@ class backupninja::server {
default => $backuptag,
}
$real_nagios2_description = $nagios2_description ? {
false => "backups",
default => $nagios2_description,
}
if $nagios_server {
# configure a passive service check for backups
nagios2::passive_service { "backups-$name": nagios2_host_name => $real_host, nagios2_description => 'backups', servicegroups => "backups" }
nagios2::passive_service { "backups-$name": nagios2_host_name => $real_host, nagios2_description => $real_nagios2_description, servicegroups => "backups" }
}
if !defined(File["$real_dir"]) {
......
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