I’m using the below page to monitor and collect some of the most important servers I got, see:
But ran into an issue with permissions when running under mod_ruid2 + cPanel jail, it won’t collect some of the vital statistics, merely the disk space, so that’s no good.
I could only think of one easy solution to it. A cronjob!
First, I renamed uptime.php (the original with PHP code) to uptime_fix.php, then added crontab with:
And added this line:
0 * * * * php /the/path/to/uptime_fix.php > /the/path/to/uptime.php
That will circumvent the permissions issue, but remember to add the cronjob under a user which has adequate permissions. Another thing, be sure to read this comment. After that, all is good. There’s a better way? Do tell.
By the way, the contents of “uptime.php” will just look something like this: