Skip to content
This repository has been archived by the owner on Jan 30, 2024. It is now read-only.

Commit

Permalink
Merge pull request #10025 from alphagov/add-content-changes-icinga-check
Browse files Browse the repository at this point in the history
Add icinga checks for email-alert-api content changes
  • Loading branch information
edwardkerry committed Jan 9, 2020
2 parents 097324f + a8ae5da commit f3c80f4
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions modules/govuk/manifests/apps/email_alert_api/checks.pp
Expand Up @@ -48,6 +48,17 @@
notes_url => monitoring_docs_url(email-alert-api-unprocessed-subscription-contents),
}

@@icinga::check::graphite { 'email-alert-api-warning-content-changes':
ensure => $ensure,
host_name => $::fqdn,
target => 'transformNull(keepLastValue(stats.gauges.govuk.email-alert-api.content_changes.warning_total))',
warning => '0',
critical => '100000000',
from => '1hour',
desc => 'email-alert-api - unprocessed content changes',
notes_url => monitoring_docs_url(email-alert-api-unprocessed-content-changes),
}

# We are only interested in the `critical` state but `warning` is also required
# for valid Icinga check configuration. Both states are set to 0 but `critical`
# takes precedence and allows us to get round this issue
Expand All @@ -61,4 +72,15 @@
desc => 'email-alert-api - unprocessed subscription contents - critical',
notes_url => monitoring_docs_url(email-alert-api-unprocessed-subscription-contents),
}

@@icinga::check::graphite { 'email-alert-api-critical-content-changes':
ensure => $ensure,
host_name => $::fqdn,
target => 'transformNull(keepLastValue(stats.gauges.govuk.email-alert-api.content_changes.critical_total))',
warning => '0',
critical => '0',
from => '1hour',
desc => 'email-alert-api - unprocessed content changes',
notes_url => monitoring_docs_url(email-alert-api-unprocessed-content-changes),
}
}

0 comments on commit f3c80f4

Please sign in to comment.