Two new checks were added to kenkou
For my work at &yet I wrote a small tool to go out and visit URLs on a regular basis and do some basic checks:
- is the site up
- does it return 200
- if it’s up and 200 and HTTPS is there any mixed-content
It works amazingly well and sends an email to our Ops team whenever it finds an issue.
The other day one of our SSL Certificates for a service API expired and I completely missed that event so I filed a bug against myself to add some sort of certificate sanity check, and now I have added that feature!
Kenkou now can check a domain that it has a valid certificate and also warn if the cert expires in less than 14 days. The certificate check is enabled by add to the url_to_check.cfg
entries that look like:
{
"production": {
"item_name": { "cert": "example.com" }
}
}
Another new feature is to allow it to verify that DNS entries are valid. To enable this a new file dns_to_check.cfg
was added and looks like:
{
"production": {
"main": { "dns": [ "example.com",
"127.0.0.1",
[ "ns1.dnsimple.com", "ns2.dnsimple.com" ]
]
}
}
}
If any of the checks fail it will send an alert to the configured target - currently PagerDuty and Postageapp.
This is a pretty nifty tool and it now let’s me add items to it as needed while knowing that if one of them fails it will alert me.
Please do let me know if you find this useful or if you find bugs!