Example of available metrics:
# HELP pihole_ads_blocked_today Ads blocked today.
# TYPE pihole_ads_blocked_today gauge
pihole_ads_blocked_today 407
# HELP pihole_ads_percentage_today Ads percentage today.
# TYPE pihole_ads_percentage_today gauge
pihole_ads_percentage_today 13.777928
# HELP pihole_dns_queries_today DNS Queries today.
# TYPE pihole_dns_queries_today gauge
pihole_dns_queries_today 2954
# HELP pihole_domains_being_blocked Domains being blocked.
# TYPE pihole_domains_being_blocked gauge
pihole_domains_being_blocked 133209
# HELP pihole_query_types DNS Query types.
# TYPE pihole_query_types gauge
pihole_query_types{type="A"} 0
pihole_query_types{type="AAAA"} 0
pihole_query_types{type="PTR"} 0
pihole_query_types{type="SOA"} 0
======= This Prometheus exporter check your Pi-Hole statistics. Available metrics are :
- Ads blocked
- Domains blocked
- DNS Queries
- Top Ads
- Top Queries
- Top clients
You can download the binaries :
- Architecture i386 [ linux / darwin / freebsd / netbsd / openbsd / windows ]
- Architecture amd64 [ linux / darwin / freebsd / netbsd / openbsd / windows ]
- Architecture arm [ linux / freebsd / netbsd ]
Launch the Prometheus exporter :
$ pihole_exporter -log.level=debug -pihole http://192.168.1.227
-
Build tool :
$ make build
-
Launch unit tests :
$ make test
-
Launch Prometheus using the configuration file in this repository:
$ prometheus -config.file=prometheus.yml
-
Launch exporter:
$ pihole_exporter -log.level=debug
-
Check that Prometheus find the exporter on
http://localhost:9090/targets
-
Run Grafana and import the dashboard dashboard.json:
$ docker run -d --name=grafana -p 3000:3000 grafana/grafana
-
Build Image:
$ docker build -t pihole-exporter .
-
Start Container
$ docker run -d -p 9311:9311 pihole-exporter -pihole http://192.168.1.5
See CONTRIBUTING.
See LICENSE for the complete license.
A changelog is available
Nicolas Lamirault nicolas.lamirault@gmail.com