Skip to content

A shell script to display Pi-Hole stats in Grafana via InfluxDB

Notifications You must be signed in to change notification settings

bradreardon/pihole-influx

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pihole-influx

A simple daemonized script to report Pi-Hole stats to an InfluxDB, ready to be displayed via Grafana.

Example Grafana Dashboard

Configuration

This container is configured by a series of environment variables.

Environment variable Description
PIHOLE_HOSTNAME The Pihole's hostname. Used for the hostname tag in InfluxDB reports.
PIHOLE_API The API URL of the Pihole on the network.
REPORTING_INTERVAL Reporting interval of script. Defaults to every 10 seconds.
INFLUX_HOST Host of the InfluxDB server.
INFLUX_PORT InfluxDB port. Defaults to 8086.
INFLUX_USER The username for the InfluxDB user
INFLUX_PASSWORD The password for the InfluxDB user
INFLUX_DB The database name in InfluxDB

Set up a Grafana Dashboard

The example dashboard seen at the top uses the collected data and displays it in concise and sensible graphs and single stats. The dashboard can be imported into your Grafana instance from the dashboard.json file included in the repo, or by using ID 6603 to import it from Grafana's Dashboard Directory.

Attributions

Quoted from the README of the forked repo janw/pi-hole-influx:

The script originally created by Jon Hayward, adapted to work with InfluxDB by /u/tollsjo in December 2016, and improved and extended by @johnappletree. "If I have seen further it is by standing on the shoulders of giants". 🤓

Further modified by Brad Reardon to work with Docker.

About

A shell script to display Pi-Hole stats in Grafana via InfluxDB

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 90.0%
  • Dockerfile 10.0%