Category: Prometheus Exporters

Guides for Prometheus Exporters to use in Grafana.

Alex's Guardian > Blog > Homelab Things > Prometheus Exporters
Expanding Pi-Hole Stats with Prometheus

Expanding Pi-Hole Stats with Prometheus

The other day I came across a Prometheus Exporter for Pi-hole (found in a comment on /r/pihole) that gives WAY more stats/data compared to the InfluxDB script I posted about awhile back. With this exporter, I was able to setup a more detailed dashboard.

Now currently I only have this setup for a single instance of Pi-Hole. I am currently in the process of setting up a second instance as a backup when my primary one goes down for updates. This dashboard can be easily updated to have either a clone of this info for your second instance or a drop down selector for instances. You’ll have to update your queries to support dashboard variables, which isn’t very hard to do.

The dashboard json can be found here.

Transmission Metrics in Grafana

Transmission Metrics in Grafana

If you use Transmission as your download client, you can use a metrics exporter for Prometheus to ingest info into Grafana to display. You’ll also want to make sure Prometheus is setup and running or else this won’t work!

SSH to your docker host that is running Prometheus and edit the prometheus.yml configuration file by adding the following:

  - job_name: 'transmission'
    scrape_interval: 10s
      - targets: ['<ip.of.transmission.exporter>:19091']

Save and close prometheus.yml. Now create the Transmission-Exporter.

docker run -d -p 19091:19091 -e TRANSMISSION_ADDR=http://<ip.of.transmission.client>:<port> metalmatze/transmission-exporter

You’ll need to change ipoftransmission:<port>to the ip:port of your Transmission install. If you have authentication enabled you’ll need to specify -e TRANSMISSION_USERNAME=username and -e TRANSMISSION_PASSWORD=passwordto the above command before metalmatze/transmission-exporter. Restart your Prometheus container so it picks up the new config. You should be able to navigate to the Prometheus web ui now and run the following query:


Should see something similar to:

Now open Grafana and under Data Sources add a new Prometheus source:


Click Save & Test. If you get an error make sure Grafana can reach Prometheus.

Adding Transmission Stats to your Dashboard

Navigate to a Dashboard you wish to add Transmission stats to and add a new singlestat panel. Under Metrics add the following query:


And then under the Options tab select “Average” for Stat and “data(metric)/bytes” under Unit.

If you want to see all of the metrics that are exported, you can navigate to http://ip-of-transmission-exporter:19091/metrics. It will display all exported metrics and their current values they would return. You can also see them by typing “transmission” into the query box under the Prometheus web ui.

Useful links:

Edit 4/29/19: Updated to match new Grafana guide settings.