![docs/_static/grafana_filesrv.png](https://raw.githubusercontent.com/coreyjewett/cmplx-mon/master/docs/_static/grafana_filesrv.png)
This is the docker-compose stack I use for my home network's monitoring. It contains the following containers:
- NGINX SSL termination for InfluxDB and Grafana traffic outside of Docker containers.
- InfluxDB to store all of the metrics (the central piece of the setup).
- Grafana to show pretty graphs and email me alerts.
- Cronitor for external monitoring of my Docker host and home network.
- NMC to include my UPS load, remaining runtime, and bedroom/living room temperatures in my Grafana graphs.
I also use the following services:
- SparkPost free tier for sending alerts emails.
Visit the documentation for instructions on how to use this repository for your own metrics/graphing setup at home. I've documented everything I need to get up and running on my server in case I ever need to replace it from scratch.
Clone this repo locally (or fork it and clone that repo) to your Docker host (I put mine in /opt/influxdb
). Also
prepare your secrets by creating empty files with the right permissions:
sudo mkdir /opt/influxdb; cd $_
sudo git clone https://github.com/Robpol86/influxdb.git .
sudo mkdir -m0750 .secrets
for f in cronitor grafana.ini nmc; do
sudo touch .secrets/$f; sudo chmod 0600 $_
done
Next you'll want to glance over the various configuration files in this repo. They work for me but you may have a different setup. Start with docker-compose.yml and look at other configuration files in this repository.
Once everything in docker-compose.yml looks good go ahead and start the containers:
cd /opt/influxdb; sudo docker-compose up -d
sudo firewall-cmd --permanent --add-port=8086/tcp
sudo firewall-cmd --permanent --add-port=3000/tcp
sudo systemctl restart firewalld.service
Verify everything works by running sudo docker ps
. You should see "influxdb" and "grafana" in the NAMES column.