I've used this for general health monitoring/alerts. You can have the host send early alerts for say CPU load getting scary for a given period.
The class allows you to output a xml file which can then be parsed into an array.
Code:
$outputarray = fetch_xml($filename,1);
$load = explode(" ", $outputarray[0][loadavg]);
if ( $load[0] > 5)
{compose and mail message}
if ( $load[1] > 4 )
{compose and mail message} Of course, the values for comparison in the conditional will vary greatly by the hardware and performance configuration of the host. Some boxes don't skip a beat with a load of 6; others are dead, dead at 6. It is an art, not a science. If your threshold is too high, the box will be dead before you ever receive an alert. Mostly, I use this to try and get a step on things like mysql running wild with a statement or exim bogging things down.
Good contribution - I had forgotten about this class because it has been so reliable and (luckily) quiet.