Skip to main content

This app collects data from monit instances on one or multiple servers, stores them and visualizes them.

Project description

# django-monit-collector

This is a django project, which collects data from <a href="" target="_blank">monit</a> instances on one or multiple servers, stores them and visualizes them using <a href="" target="_blank">bootstrap</a> and the javascript library <a href="" target="_blank">dygraphs</a>. Example website:

There is a very similar app for the server monitoring tool <a href="" target="_blank">supervisor</a> called <a href="" target="_blank">djangovisor</a>.

### Features
- Collects and parses monit xml data from one or multiple servers.
- Stores the data for a given time period.
- Displays it in pretty graphs.
- Start/stop/restart buttons for processes.
- Status tables and graphs are refreshing automatically via ajax.
- Processes are automatically removed when they stop sending data (removed from monitrc). Servers can be deleted manually.

### Installation

Just install it via pip:
pip install django-monit-collector
Or clone the repository if you want to modify the code:
git clone

Add 'monitcollector' to your installed apps in
# ...
If you want to you can change the default values in your
# should be the same as set in the monitrc file e.g. "set daemon 60"
# maximum days to store data, only correct, if MONIT_UPDATE_PERIOD is set correctly
Include monitcollector in your
import monitcollector.urls as m_urls

url(r'^monitcollector/', include(m_urls)),
Create/sync the database and create a superuser (you need to login to access the monit-collector dashboard):
python syncdb
Collect static files:
python collectstatic
With correct webserver configurating the app should then be available at

In your monitrc file add this line to send data to the collector.
set mmonit
If you want to enable the start/stop buttons (optional), the monit http daemon must be available, in monitrc (you can also)
set httpd port 2812
allow myuser:mypassword
If you don't want to allow access from everywhere add "allow ip.address..." with the ip address of the server, where monitcollector is installed.
The user and password have to be set in the
MONIT_USER = youruser
MONIT_PASSWORD = yourpassword
You don't have to specify the port if you use the default port 2812. Also, the port must not be blocked by the firewall, e.g.
ufw allow 2812

You can also monitor this app with monit itself. Not using the privided script lead to error in my case.
check process monitcollector with pidfile /path/to/pid/
start program = "/project/path/ start"
stop program = "/project/path/ stop"
if failed host port 8011 protocol http then restart
if 5 restarts within 5 cycles then alert
Then you should have the same port and pid path in your gunicorn.conf
bind = ''
pidfile = '/path/to/pid/'

### License
BSD License.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for django-monit-collector, version 0.8
Filename, size File type Python version Upload date Hashes
Filename, size django-monit-collector-0.8.tar.gz (166.7 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page