Giter Site home page Giter Site logo

pihole_exporter's Introduction

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 [email protected]

pihole_exporter's People

Contributors

aeriff avatar brentahughes avatar nlamirault avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.