Docker image for SimpleMonitor with Webserver
2.2K
SimpleMonitor by James Seward is a Python script which monitors hosts and network connectivity. It is designed to be quick and easy to set up and lacks complex features that can make things like Nagios, OpenNMS and Zenoss overkill for a small business or home network. Remote monitor instances can send their results back to a central location.
Give jamesoff/simplemonitor a Star!
This docker image installs SimpleMonitor on Alpine and includes a nginx webserver, where you can get the status of your hosts and services.
I don't like docker run commands with a lot of arguments, so here's a sample docker-compose file:
version: '3.2'
services:
simplemonitor:
restart: always
image: braindoctor/simplemonitor-docker:latest
container_name: simplemonitor
hostname: simplemonitor.domain.local
volumes:
- /tmp/simplemonitor:/etc/simplemonitor
ports:
- "8080:8080"
The default docker-compose.yml file has more detailed comments.
You should now be able to point your browser to http://simplemonitor:8080 and retrieve a basic status HTML page:

http://simplemonitor:8080/status.json returns a JSON representation of the service status, if you want to poll it by a browser and create nice badges with javascript (or whatever). Do not expect the "API" to be stable though (some fields may change in future, watch the changelogs).
{
"generated":"2017-07-31 15:03:35",
"monitors":{
"localhost":{
"status":"OK",
"virtual_fail_count":0,
"last_run_duration":0.0034890174865722656,
"dependencies":[],
"result":"0.037ms",
"first_failure_time":""
}
}
}
docker-compose up -d. The default configuration is being copied to the location above.docker-compose stop./path/to/your/simplemonitor/global.ini as appropriate. See http://jamesoff.github.io/simplemonitor/configuration.html for reference./path/to/your/simplemonitor/monitors.ini. See http://jamesoff.github.io/simplemonitor/monitors.html for reference.docker-compose startYou have 2 options:
/etc/nginx/nginx.conf and /etc/nginx/conf.d/simplemonitor.conf as needed. Make sure to make the changes persistent by mounting them from outside.This image and software has been designed with simplicity in mind, not for security or scalability. As always, use it at your own risk!
Content type
Image
Digest
Size
64 MB
Last updated
over 8 years ago
docker pull braindoctor/simplemonitor-docker