Alexandros Kosiaris has uploaded a new change for review.
https://gerrit.wikimedia.org/r/305261
Change subject: maps: Set up postgres replication lag monitoring
......................................................................
maps: Set up postgres replication lag monitoring
Add an NRPE check used to check the Postgres replication lag. Add
critical/warning thresholds of 10 and 5 minutes respectively
Change-Id: I6692d472aacd85b23db2c4ce50c86834d0fa6959
---
M modules/role/manifests/maps/slave.pp
1 file changed, 10 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/puppet
refs/changes/61/305261/1
diff --git a/modules/role/manifests/maps/slave.pp
b/modules/role/manifests/maps/slave.pp
index 5d24736..52619fb 100644
--- a/modules/role/manifests/maps/slave.pp
+++ b/modules/role/manifests/maps/slave.pp
@@ -7,5 +7,15 @@
ensure => 'present',
description => 'Maps Postgres slave',
}
+
+ $pg_password = hiera('postgresql::slave::replication_pass')
+ $critical = 1800
+ $warning = 300
+ $command = "/usr/lib/nagios/plugins/check_postgres_replication_lag.py \
+-U replication -P ${pg_password} -D template1 -C ${critical} -W ${warning}"
+ nrpe::monitor::service { 'postgres-rep-lag':
+ description => 'Postgres Replication Lag',
+ nrpe_command => $command,
+ }
}
--
To view, visit https://gerrit.wikimedia.org/r/305261
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I6692d472aacd85b23db2c4ce50c86834d0fa6959
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Alexandros Kosiaris <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits