monitors.txt lazy web app monitoring

TL;DR An idea to specify your web app’s monitoring in a plain text file that any monitoring provider reads at http://yoursite.tld/monitors.txt to setup your monitors.

What is monitors.txt?

A text file that lives at www.yoursite.tld/monitors.txt and describes in plain text what monitoring you want done on your site.

Your monitoring provider regularly reads your monitors.txt file to configure your application’s monitors. Due to the open nature of monitors.txt, you’ll be able to quickly switch monitor providers or even add new providers without hassle.

Define monitors where they belong

One intention of monitors.txt is to encourage developers to improve monitoring for their web sites by making it easy to setup new monitors; I don’t enjoy logging into some monitoring service web app to setup monitors, but I do enjoy writing readable monitoring tests right there in my code, where they belong.

What if I want to keep my monitor configuration private?

Two ways spring to mind:

  1. Restrict access to the file so only your monitoring provider can read it

  2. For the more gung-ho, obfuscate the URL and use SSL (e.g. https://yoursite.tld/something-unguessable/monitors.txt) and tell your provider where to find your monitors.txt

Show me a sample monitors.txt already

Perhaps a service could support multiple formats for monitors.txt:

Can I start using monitors.txt?

If you build it, yep. Sorry, this monitors.txt article is just an idea I had one weekend that I hastily decided to publish. It got some useful feedback on Hacker News if you would like to read more.

Update, 29th Jan 2013

I did toy with the idea of providing a service to do this, and produced a prototype that worked with a Cucumber/Gherkin format monitors.txt. However, my monitoring needs and views have evolved since then and I’ve stopped work on it.

Author

Eliot Sykes (e -at- jetbootlabs.com)