Ottomata has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/399260 )
Change subject: Allow nagios to sudo to check analytics database backup newest
file age
......................................................................
Allow nagios to sudo to check analytics database backup newest file age
Bug: T182327
Change-Id: Ide3ccf3bd2846b482e7c178bc50a9d307dc91d51
---
M modules/profile/manifests/analytics/database/meta/backup_dest.pp
1 file changed, 7 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/puppet
refs/changes/60/399260/1
diff --git a/modules/profile/manifests/analytics/database/meta/backup_dest.pp
b/modules/profile/manifests/analytics/database/meta/backup_dest.pp
index 5be8007..5d0fa5a 100644
--- a/modules/profile/manifests/analytics/database/meta/backup_dest.pp
+++ b/modules/profile/manifests/analytics/database/meta/backup_dest.pp
@@ -51,12 +51,18 @@
srange => "@resolve((${rsync_clients_ferm}))",
}
+
+ sudo::user { 'nagios_check_newest_file_age':
+ user => 'nagios',
+ privileges => ['ALL = NOPASSWD:
/usr/local/lib/nagios/plugins/check_newest_file_age'],
+ }
+
# Alert if backup gets stale.
$warning_threshold_hours = 26
$critical_threshold_hours = 48
nrpe::monitor_service { 'analytics-database-meta-backup-age':
description => 'Age of most recent Analytics meta MySQL database
backup files',
- nrpe_command => "/usr/local/lib/nagios/plugins/check_newest_file_age
-C -d /srv/backup/mysql/analytics-meta -w ${$warning_threshold_hours} -c
${critical_threshold_hours}",
+ nrpe_command => "/usr/bin/sudo
/usr/local/lib/nagios/plugins/check_newest_file_age -V -C --check-dirs -d
/srv/backup/mysql/analytics-meta -w ${$warning_threshold_hours} -c
${critical_threshold_hours}",
contact_group => 'analytics',
}
}
--
To view, visit https://gerrit.wikimedia.org/r/399260
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ide3ccf3bd2846b482e7c178bc50a9d307dc91d51
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ottomata <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits