Skip to content
A PHP script for visualizing your servers Monit monitored services
PHP
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
css
data
monitrc
tools
.gitignore
LICENSE
README.md
config.php
cron.php
getdata.php
index.php
monit-graph.class.php

README.md

Monit Graph

Introduction

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.

Features

  • 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.

HOWTO

  1. Get monit and enable the buitin HTTP server.

  2. Set the permissions for data directory to 775.

  3. Change permissions for data/index.php to 644.

  4. 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'.

  5. Setup a crontab job to run cron.php every minute.

    Example:

    * * * * * php /path/to/monit-graph/cron.php >> /tmp/monit-graph.log
    
  6. 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.

  7. Protect access to index.php using basic authentication.

  8. Disable access to the tools directory.

Author

This script was originally created by Dan Schultzer from Dream Conception and Abcel.

TODO

Convert this to Lua and make use of Nginx embedded Lua module.

Something went wrong with that request. Please try again.