Skip to content

deividgdt/nagiosplugin_piholeapi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 

Repository files navigation

Nagios/Centreon Plugin for the Pihole API

A plugin to extract (almost) all the information from the Pi-hole API.

Installation

  • Just put it in the folder /usr/lib/nagios/plugin

Token

  • Get the token from the value WEBPASSWORD in the file /etc/pihole/setupVars.conf and put it in /usr/lib/nagios/plugin/apihole.token

Usage

  • Usage ./check_pihole_api -h pihole_ipaddress -p [ http || https ] -s [ clients || queries || ads ] || -i || -q || -t

  • -s (summary)

    • clients: Number of clients using Pihole as their DNS server
    • queries: Number of DNS queries
    • ads: Number and percentage of ads blocked.
  • -p (protocol) Protocol to be used in the API call (http||https). By default: http

  • -i (information) show the version of the plugin

  • -q queries by type AAAA, A, SOA, TXT, PTR, ANY, SRV, IPV4, IPV6

  • -t Show a TOP number of queries by host

More info

Buy me a coffe

ko-fi

About

A Nagios/Centreon Plugin for Pihole API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages