aboutsummaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authorAntoine Beaupre <anarcat@koumbit.org>2009-01-06 16:49:37 -0500
committerAntoine Beaupre <anarcat@koumbit.org>2009-01-06 16:49:37 -0500
commit392438512bf1fa82cbac491596a7387b6cb43e86 (patch)
tree99d8b768e5a0e3cc5e6228ff9cb51309162773ce /manifests
parentb27f528d43b40105af2e34d066d2f54c5e6a1dcb (diff)
downloadpuppet-backupninja-392438512bf1fa82cbac491596a7387b6cb43e86.tar.gz
puppet-backupninja-392438512bf1fa82cbac491596a7387b6cb43e86.tar.bz2
add checkbackups cron job, fix multiple instances of passive service for manually specified sandboxes
Diffstat (limited to 'manifests')
-rw-r--r--manifests/server.pp19
1 files changed, 18 insertions, 1 deletions
diff --git a/manifests/server.pp b/manifests/server.pp
index 6033249..e4ed80a 100644
--- a/manifests/server.pp
+++ b/manifests/server.pp
@@ -23,6 +23,20 @@ class backupninja::server {
mode => 0710, owner => root, group => "backupninjas"
}
+ file { "/usr/local/bin/checkbackups":
+ ensure => "present",
+ content => template("backupninja/checkbackups.sh"),
+ mode => 0755, owner => root, group => root,
+ }
+
+ cron { checkbackups:
+ command => "/usr/local/bin/checkbackups.sh | /usr/sbin/send_nsca -H nagios.koumbit.net -c /etc/send_nsca.cfg",
+ user => "root",
+ hour => 8,
+ minute => 0,
+ require => [ File["/usr/local/bin/checkbackups"], Package['nsca'] ]
+ }
+
User <<| tag == "backupninja-$real_backupserver_tag" |>>
File <<| tag == "backupninja-$real_backupserver_tag" |>>
Ssh_authorized_key <<| tag == "backupninja-$real_backupserver_tag" |>>
@@ -63,10 +77,13 @@ class backupninja::server {
default => $authorized_keys_file,
}
$real_backuptag = $backuptag ? {
- false => "backupninja-$real_host",
+ false => "backupninja-$fqdn",
default => $backuptag,
}
+ # configure a passive service check for backups
+ nagios2::passive_service { "backups-$real_host": nagios2_host_name => $real_host, nagios2_description => 'backups' }
+
@@file { "$real_dir":
ensure => directory,
mode => 0750, owner => $real_user, group => 0,