iPhone Server Alerting on High Load
Friday, January 15. 2010
I have a shared Dreamhost account. In fact, I manage two: my own, and work's. Typically I don't too much care about my personal site going up or down, but I have multiple sites running under my account - and our work account with Dreamhost must maintain a decent responsiveness during business hours.
I've been developing a CakePHP plugin for Prowl but haven't quite polished it well enough for release. In the meantime, my work's Dreamhost account has had major issues where the server load would spike up to 350+ (I have no idea how many cores there are). That's just ludicrous. We've recently been moved to a new server by the support staff (for the 5th time) and although the average server load is now 0.40, I don't want to take my chances without a backup plan. Enter Prowl and my iPod Touch.
(To use Prowl, you would need an iPod touch or iPhone, and paid for and installed the Prowl application; it's $4.99 as of this writing. You then need to get your API from the prowl.preks.net website.)
We'll be using the PHP 3rd party API for Prowl, built by "Fenric", and we will go to his GitHub account to get it.
Once we have the PHP API for Prowl from Fenric, we'll build some quick code to make use of it:
This little script can easily be setup with a cronjob and automatically check the current server's load and report issues. It won't report if a server is down since it must run on the server it is reporting on, but it would help inform about possible problems that should be looked at. This could easily be extended to check the MySQL long query logs, or other reporting functions.
I've been developing a CakePHP plugin for Prowl but haven't quite polished it well enough for release. In the meantime, my work's Dreamhost account has had major issues where the server load would spike up to 350+ (I have no idea how many cores there are). That's just ludicrous. We've recently been moved to a new server by the support staff (for the 5th time) and although the average server load is now 0.40, I don't want to take my chances without a backup plan. Enter Prowl and my iPod Touch.
(To use Prowl, you would need an iPod touch or iPhone, and paid for and installed the Prowl application; it's $4.99 as of this writing. You then need to get your API from the prowl.preks.net website.)
We'll be using the PHP 3rd party API for Prowl, built by "Fenric", and we will go to his GitHub account to get it.
Once we have the PHP API for Prowl from Fenric, we'll build some quick code to make use of it:
This little script can easily be setup with a cronjob and automatically check the current server's load and report issues. It won't report if a server is down since it must run on the server it is reporting on, but it would help inform about possible problems that should be looked at. This could easily be extended to check the MySQL long query logs, or other reporting functions.
Trackbacks
Trackback specific URI for this entry
No Trackbacks

Comments
As for the RSS feed...when I tested all feeds available from the nav on the left (manually within Firefox) just now, ATOM versions shows 3, RSS versions show something like 10 or 15. I'm not really sure why you'd only be seeing one?
If you were to view the source of the link rather than allow it to render, do you see more content? It's possible some of the values inserted in one (or more) of my posts are not allowing for proper reading in whatever feed reader you're using. I'm not sure what else it could be. The feed validators see more entries too.