· Alexander · Grafana · 3 min read
Deluge -> InfluxDB
Getting Deluge stats into InfluxDB and Grafana using a thin client and a community InfluxDB script.

So ever since I got my remote seed box setup from seedboxes.cc I have been trying to figure out the best way to get Deluge stats to show up in my Grafana stack.
I first tried a Deluge Exporter for Prometheus but it didn’t seem to work as it required the config directory of Deluge in order for it to export the stats. Really dumb but it’s whatever. I then came across an influxdb script that sent Deluge stats to Influx. However, that did not work either as apparently the /json endpoint used a self-signed certificate and the script errored because of that.
BUT, I got that script to actually work though! Had to use a deluge “thin client” to connect to the remote seed box and basically mirror the data locally. This was done by running a deluge container in docker and using the connection preferences to connect to Cerberus (my remote seedbox).
Now a quick note here, this dashboard is currently a full WIP as I learn what data is what and how to properly visualize it in Grafana.
What you will need to set this up
- Docker
- Deluge or Deluge thin client
- InfluxDB obviously.
First make sure you have docker installed and set up (preferably on a Linux host). Then make sure you have your deluge client set up and configured properly for hosting Linux ISO downloads, etc.
First create the deluge database, user and assign the appropriate permissions. If you do not have a Grafana/Influx stack going see my guide here.
curl -XPOST "http://ip.of.influx.db:8086/query" -u admin:password --data-urlencode "q=CREATE DATABASE 'deluge'"
curl -XPOST "http://ip.of.influx.db:8086/query" -u admin:password --data-urlencode "q=CREATE USER deluge WITH PASSWORD 'deluge'"
curl -XPOST "http://ip.of.influx.db:8086/query" -u admin:password --data-urlencode "q=GRANT WRITE ON deluge TO deluge"
curl -XPOST "http://ip.of.influx.db:8086/query" -u admin:password --data-urlencode "q=GRANT READ ON deluge TO grafana"Create an exporters folder inside your Influxdb directory.
# BASH [ LINUX VM ]mkdir /opt/containers/influxdb/exporters && mkdir /opt/containers/influxdb/exporters/delugeCopy the following into a file on your docker host and then edit it to match your setup.
# BASH [ LINUX VM ]curl https://bin.alexsguardian.net/raw/deluge2influx -o /opt/containers/influxdb/exporters/deluge/deluge2influx-compose.yml# BASH [ LINUX VM ]nano /opt/containers/influxdb/exporters/deluge/deluge2influx-compose.ymlWhen you finish editing hit CTRL+X then Y to save and close the file.
Now start up the container.
# BASH [ LINUX VM ]docker-compose -f /opt/containers/influxdb/exporters/deluge/deluge2influx-compose.yml up -dCreate a new dashboard in Grafana and import this .json file. Note that this dashboard expects the data source in Grafana to be called “deluge”.