Alexandros Kosiaris has submitted this change and it was merged.
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(-)
Approvals:
Alexandros Kosiaris: Verified; Looks good to me, approved
diff --git a/modules/role/manifests/maps/slave.pp
b/modules/role/manifests/maps/slave.pp
index 5d24736..2897fe0 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: merged
Gerrit-Change-Id: I6692d472aacd85b23db2c4ce50c86834d0fa6959
Gerrit-PatchSet: 5
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Alexandros Kosiaris <[email protected]>
Gerrit-Reviewer: Alexandros Kosiaris <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits