Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

pihole_exporter

License Apache 2 GitHub version

  • Master : Circle CI
  • Develop : Circle CI

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

Dashboard

Installation

You can download the binaries :

Usage

Launch the Prometheus exporter :

$ pihole_exporter -log.level=debug -pihole http://192.168.1.227

Development

  • Build tool :

      $ make build
    
  • Launch unit tests :

      $ make test
    

Local Deployment

  • 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
    

Docker Deployment

  • Build Image:

      $ docker build -t pihole-exporter .
    
  • Start Container

      $ docker run -d -p 9311:9311 pihole-exporter -pihole http://192.168.1.5
    

Contributing

See CONTRIBUTING.

License

See LICENSE for the complete license.

Changelog

A changelog is available

Contact

Nicolas Lamirault nicolas.lamirault@gmail.com

About

Prometheus exporter for PiHole metrics

Resources

License

Packages

No packages published