There are plenty professional monitoring solutions that provide alerts and monitoring facilities for Linux servers.
They are mostly optimized for server administration and make it a little to hard for developers to understand their application resource usage under constrained environments.
It is especially annoying that many of them only fetch data from SMNP agents, making unnecessarily hard to have your own data plotted along other interesting system stats.
This monitoring tool available from here is easy to setup, immediate to use and support plugging in your own data easily.
Installation is simple enough but it comes with no package for Ubuntu.
To have it running just set up the dependencies:
wget https://github.com/darold/sysusage/archive/master.zip unzip master.zip aptitude install sysstat librrds-perl libgd3 libgd-dev apache2 make
And install some needed perl modules:
cpan cpan install "Proc::Queue" cpan install "GD"
Be wary when configuring cpan at the first step to select the right mirror! I had the “GD” module failing to install because a module wasn’t available in the automatically selected mirror.
After all dependencies are in place enter into the sysusage source folder and run a build
cd sysusage-master/ make && make install
Now you only have to set up cron with the sysusage jobs and you’re done
crontab -e * * * * * /usr/local/sysusage/bin/sysusage > /dev/null 2>&1 */5 * * * * /usr/bin/nice -19 /usr/local/sysusage/bin/sysusagegraph > /dev/null 2>&1
The cron jobs will collect the data and drop it on the apache2 folder in form of prerendered graph and html pages. Just make sure you protect them with an appropriate .htaccess