If you need great server monitoring, use copper egg. It inexpensive, easy to install and very very good.
If you happen to use PHP with Linux, a lot of usesful information can be extracted from the /proc filesystem. Enough to provide basic monitoring. The attached script dumps and processes the output from proc every minute as json.
Make sure to protect the directory you're outputing this into to.
One response to “Use PHP-CLI to publish server stats via json”
This is ridiculously bad it shouldnt be allowed online..