Ema has submitted this change and it was merged.

Change subject: zerofetch icinga check
......................................................................


zerofetch icinga check

Generate an icinga alert if zerofetch has not been running successfully.
Warn after 4 hours, critical after one day.

Bug: T132835
Change-Id: Ifa1b5605b5b6aba916ce1407438cc852bcecb82b
---
M modules/varnish/manifests/zero_update.pp
1 file changed, 9 insertions(+), 0 deletions(-)

Approvals:
  Ema: Verified; Looks good to me, approved
  BBlack: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/modules/varnish/manifests/zero_update.pp 
b/modules/varnish/manifests/zero_update.pp
index 197ee25..af47067 100644
--- a/modules/varnish/manifests/zero_update.pp
+++ b/modules/varnish/manifests/zero_update.pp
@@ -14,6 +14,15 @@
         require => Package['python-requests'],
     }
 
+    # Generate icinga alert if zerofetch has not been running successfully.
+    # Warn after 4 hours, generate a critical alert after 24 hours.
+    $check_args = '-w 14400 -c 86400 -d /var/netmapper/ -g .update-success'
+    nrpe::monitor_service { 'zerofetch-freshness':
+        description  => 'Freshness of zerofetch successful run file',
+        nrpe_command => "/usr/lib/nagios/plugins/check-fresh-files-in-dir.py 
${check_args}",
+        require      => 
File['/usr/lib/nagios/plugins/check-fresh-files-in-dir.py'],
+    }
+
     file { '/etc/zerofetcher':
         ensure => directory,
         owner  => 'root',

-- 
To view, visit https://gerrit.wikimedia.org/r/294072
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifa1b5605b5b6aba916ce1407438cc852bcecb82b
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ema <e...@wikimedia.org>
Gerrit-Reviewer: BBlack <bbl...@wikimedia.org>
Gerrit-Reviewer: Ema <e...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to