Script run by Icinga that verifies GOV.UK email alerts have been sent
Ruby
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
docs
lib
spec
.rspec
.ruby-version
Gemfile
Gemfile.lock
Jenkinsfile
LICENCE.txt
README.md
Rakefile

README.md

Email alert monitor

GOV.UK provides email alerts. This repo provides scripts that verify that emails have been sent for certain publications.

Currently the script looks at drug and medical advice alerts and foreign travel advice alerts.

Drug and medical advice alerts

An email address has been subscribed to these alerts (via the email signup page).

Every hour, we look at the public RSS feed for alerts. We then check the email address has received an email for these publications via the Google Gmail API.

The EMAILS_THAT_SHOULD_RECEIVE_DRUG_ALERTS environment variable contains the email address that has been subscribed to receive these emails.

Travel advice alerts

An email address has been subscribed to these alerts (via the email signup page).

Every hour, we look at the content store feed for alerts. We then check the email address has received an email for these publications via the Google Gmail API.

The EMAILS_THAT_SHOULD_RECEIVE_TRAVEL_ADVICE_ALERTS environment variable contains the email address that has been subscribed to receive these emails.

Technical documentation

Running

bundle exec rake run for the drug and medical device alert checker

bundle exec rake run_travel_alerts for the travel advice alert checker

Both rake tasks will exit normally and not output anything if everything is OK.

If they find that some alerts have not been sent out, they will print the missing alerts and exit with a non-zero exit code. When run by Icinga, this will alert developers.

Running the test suite

bundle exec rspec

Licence

MIT License