Download!Download Point responsive WP Theme for FREE!

Save Your Ass and Maybe Land More Work with httpmon

So right now this site is down which gave me a good idea of what to write about and that is the Android app which advised me it was down that I have been relying upon to alert me whenever various servers and websites with which I’m involved either slow down too much or fail altogether.

The name’s httpmon – HTTP Server Monitor by Jeffrey Blattman. It’s rather crude and simple but fully effective. What you do is tell it to add a new monitor (you can add as many as you want), you specify whether you want it just to ping the server or to connect through HTTP to check it either for a certain response code, the time it takes for the server to field the request or a string you can specify of what either the header or the content of whatever you GOT contains or a combination of those.

And then in the event of a monitor not passing your conditions cleanly, you can set it to alert you either with a regular Android notification after X failures at Y intervals or have it send you a text message. Or both – have the phone start bugging out with alerts if it fails twice over twenty minutes every subsequent ten minutes and then after an hour of the server failing to go back up and meet your conditions or a failure on your part to acknowledge the alerts, to hit you with a text message, which you can have go to your Google Voice number to forward to multiple phones and multiple email accounts. Whatever you want.

So for me, I’m hosting a lot of websites, some of them are for VIPs like our own Ramon Trotman’s Lifestyles Defined – a site replete with swag, by the way, check it out, especially if you like sneakers. Told him I’d keep that sucker online and could let him pack his site with triple the density of swag than that Squarespace company was offering him. Ramon is constantly on the site so I need a quick heads up otherwise he’ll hit me with a text message on my non-Google Voice number which costs me like 25 cents. Can’t let Ramon down. I don’t know what he’s capable of.

Now another one of the sites I host, less important than his, is what let’s just call an image-heavy website that right now for example is pumping out 27Mbps fielding about 17 hits a second. As the day progresses and more people find themselves in the mood to look at pictures, which will coincide with Ramon checking his website, I need to know fast firstly if his site is taking more than 500ms to respond to a request from my phone over cellular with some PHP in it (the actual response is faster but from a cell phone things are a little muddier so 500ms isn’t as low a standard of excellence as it normally sounds), which will let me know it’s time to check to see how the IO activity’s doing along with the other resources and maybe throttle down the bandwidth or max connections per IP or whatever to the vhost of the picture website for the sake of his site running fast and the others I host. And if the other test on his site, also on a one minute cycle (so every thirty seconds I hit his site), gets rejected or times out after four seconds to blast me with text messages right away so that I can take down the picture site from the phone and give it a fail whale 503 page with a quick .htaccess switcharoo through ssh, then go on IRC and ask how to ease up the disk activity on such a site without compromising high resolution, they tell you use Batcache and Memcached (not Super Cache), badabing, multiple problems solved.

I also can’t let my paying clients down, not to mention my picture audience, so in addition to these little ping activities I have this thing monitoring some of my other websites by having them compose pages requiring both PHP and SQL to pump out a certain chunk of text. That way if the site has some sort of SQL failure or gets hacked, even if Apache’s responsive, if something is there or isn’t there that should or should not be there, I want to know about it.

Also, for clients I do non-web work for, like spreading the Google Cloud love, I add their website to the list of sites this program hits so that in the event of a failure of their website hosted by someone else I can sound the alarm for them first, maybe get on the horn with their ISP. Then they see that I’ve got an apparent web skill and sort of have their back, then they may retain my various web services in addition to the cloud stuff. This has happened three times since I installed httpmon.

The thing’s free, it’s definitely better than all the others I found which I tried, and if you’re not Android I imagine there are similar programs for your platform too but maybe one of you would be so kind and check that for your WP buddies reading this.

You may be wondering, what about when I go through a rural area or ride the subway, I don’t want this thing going off. Well it seems it’s able to figure out when the phone doesn’t have a signal and disregards the failures until it reestablishes a connection. Which might make you think, well why wouldn’t I just install something that does the same thing but on my home computer or Linux server, given that I lose my signal sometimes and occasionally my battery dies? Well I don’t know, do both. Whatever. Why are you breaking my balls already.

Also it sounds cooler to report to a prospective client that “yeah I’ve been monitoring your site every two minutes with my Google phone” than “my Linux server monitors your ISP’s server.” “Oh really, you can do that?” “Yup.” “Can I?” “Sure, I recommend the Nexus.” “Well why’s the site down?” “Well, Dreamhost’s main site is still up and nmap is showing that the other ports on your host yada yada, maybe you should use my server indefinitely etc” … “ “Wow we’re so lucky to have you, too bad you’re married.”

That was a slight dramatization but you get the idea.

Dreamhost really really sucks by the way, according to my empirical data. Seriously, don’t use them. They suck so hard, apparently, that they actually preemptively registered (George W Bush invented that move) and pointed it at their main site with “A Happy DreamHost Customer” as the contact name on the whois. Actually now it’s not loading – so either they stripped the A record or their site’s down.

So here’s the market link, Google Code page, also Jeff Blattman wrote fourteen other apps you might want to check out. And Jeff, how about a donation link bro? Think I owe you a few bucks, though this is a pretty solid review (admittedly very tl;dr) so one could argue we’re even.

Doug Simmons