Reporter: A PHP-based content monitoring, testing, and notification suite

Introducing Reporter, PHP-based, developer-focused content monitoring, testing, and notification suite. For the past 5 years or so, I've run my own health checks against my sites and services, both personal and professional, and I've recently packaged up what I've been using and released it as Reporter on Github.

Why another health check tool?

Professionally, I've often been in the situation where I'm responsible for the many large-scale websites and services. Most of the time however, the monitoring tools used to ascertain their health are owned but other non-developer groups, like network or online operations. As those teams make it their responsibility to keep the sites up, they want to control the monitoring tools, but when things really go wrong, I'm the one on the hook for downtime in the eyes of the business. Sometimes health checks were not setup, and other times they were setup properly, but ignored when they alarmed. I developed Reporter as a quick to setup, yet reliable way of monitoring sites and services, and to complement larger, more robust site monitoring tools.

Having a monitoring tool at your disposal is usable for a number of other situations as well. As a developer, you often are tasked with hunting down transient bugs, that by definition are hard to reproduce. With a tool like Reporter, you can write logic to look for a specific bug, and then be alerted when that situation happens. There's nothing like troubleshooting an issue while it's happening. Reporter sits happily somewhere between an integration test service, and an uptime or health-check monitoring service.

What does Reporter do?

Reporter is a simple cron-based monitoring tool that can be connected to an email service so you can receive notifications when conditions you specify are not met. These conditions are written in a JSON format test script, containing one or more tests that are executed against the URL you provide. Tests can execute an operator function (like contains, greater than, equals) against the contents of the URL you provide, and can look for things like the presence of a specific string on a page, an HTTP response status, or a complex comparison that executes a custom content class that you write in PHP. You setup each test script to run when you want through your system's crontab.

The point of Report is that you're in control, and the setup is simple. No complex installations or dependencies. A Linux box with PHP and its Curl library are all you need to get up and running. Setting up a connection to an email service, is optional, but a useful way to be notified when your test scripts fail. Alternately, you can monitor a test log file for results of your tests.

An example test script that checks github.com for the word Github and a 200 HTTP status.

{
    "name":"GitHub Content Test",
    "uri":"http:\/\/github.com",
    "content":"html",
    "operator":"contains",
    "args":"GitHub"
},
{
    "name":"GitHub Status Test",
    "uri":"https:\/\/github.com",
    "content":"status",
    "operator":"=",
    "args":"200"
}

Where to get Reporter

Reporter is available at Github, and submitted issues or pull requests are welcome!