Monit Graph is a logging and graphing tool for Monit written in PHP5. It can manage big amounts of data, and will keep a history of Monit statuses.
This is a fork of the google code project.
-
Easy to manage and customize.
-
Several different graphs (Google Charts) of memory, cpu, swap and alert activity.
-
Data logging with XML files.
-
Chunk rotation and size limitation.
-
Multiple server setup.
-
Set the permissions for
data
directory to 775. -
Change permissions for
data/index.php
to 644. -
Modify
config.php
to match your monit setup and configure the graphing. Set this file readable only by the owner and the PHP process owner (www-data
on Debian), i.e., permission '0440'. -
Setup a crontab job to run cron.php every minute.
Example:
* * * * * php /path/to/monit-graph/cron.php >> /tmp/monit-graph.log
-
Verify after a few minutes of running that the logging happens. You can check the php error log if there seams to be something wrong.
-
Protect access to
index.php
using basic authentication. -
Disable access to the
tools
directory.
This script was originally created by Dan Schultzer from Dream Conception and Abcel.
Convert this to Lua and make use of Nginx embedded Lua module.