Docker image for glances including export options and configuration for InfluxDB
1.4K
See source at https://github.com/guyadams/glances-rpi
This image was built to use the excellent glances tool on raspberry pi machines to export to Influx DB to in turn chart with Grafana. All the other export modules are in there (except cassandra which just takes forever to build and I don't need it - if you do, let me know in the comments and I will add). You will need to tweak the configuration options since I have only provided envrionment variables to set the Influx options. You can also change the last line of "start_glances.sh" if you want to do other things or use glances interactively.
This is one of my first docker images intended for use by people other than me - feedback is welcome.
This should run on any Raspberry Pi that can run docker (which I believe is all, but please correct me if this is not the case). I have done all the development work on a Pi3 so this is most likely to work well and also tested on my Pi0 W. However - be very careful setting INFLUX_TIME too small on a low powered device - the glances monitoring itself imposes a significant load.
docker run -itd -v /var/run/docker.sock:/var/run/docker.sock:ro --pid host \
-e "INFLUX_HOST=1.2.3.4" \
-e "INFLUX_USER=root" \
-e "INFLUX_PASSWORD=yourpassword" \
-e "INFLUX_TAGS=server:pi3super,owner:guyadams99" \
-e "GLANCES_OPTIONS=--enable-process-extended" \
guyadams99/glances-rpi
Note that the prefix approach that glances seems to prefer is not the best way to with with Influx. By using tags, and specifically setting the server tag, the dashboard you can find in github will 'just work' and as you add more hosts, these will appear in the Server drop down list as if by magic.
The following variables are mandatory if you want anything to work:
Optional additional parameters:
Content type
Image
Digest
Size
136.9 MB
Last updated
about 9 years ago
docker pull guyadams99/glances-rpi