Certificate monitoring
Monitoring for certificate expiration
A simple mechanism has been put in place to give us daily checks on the expiration time of our certificates. Here's how to add a new check for a host:
- Using the credentials in the vault log into the healthchecks account
- Create a new check, give it a meaningful name and tags
- For a 30 day check, set the check period to two days and the grace period to twelve hours. For a 3 day check, set the period to one day and the grace period to 6 hours
- Go to the integrations page, and turn off notifications on Pagerduty if the check is for 30 days.
- Make note of the unique healthcheck endpoint that is generated.
- Go to the Heroku app (Ask Chris for access if required)
- Open up the Heroku Scheduler Add-on and create a new daily task.
- Fill in the variables in this command, given the nature of the check you set up:
test $(node_modules/.bin/ssl-date-checker changecopyright.org -f json | jq '.expires') -gt $30_OR_3 && curl -fsS --retry 3 $HEALTHCHECK_ENDPOINT