Search Exchange
Search All Sites
Nagios Live Webinars
Let our experts show you how Nagios can help your organization.Login
Directory Tree
Check Pihole Api Plugin
Meet The New Nagios Core Services Platform
Built on over 25 years of monitoring experience, the Nagios Core Services Platform provides insightful monitoring dashboards, time-saving monitoring wizards, and unmatched ease of use. Use it for free indefinitely.
Monitoring Made Magically Better
- Nagios Core on Overdrive
- Powerful Monitoring Dashboards
- Time-Saving Configuration Wizards
- Open Source Powered Monitoring On Steroids
- And So Much More!
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
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
Reviews (1)
No usable output! How to resolve error message?
$ ./check_pihole_api.sh -h localhost -t
./check_pihole_api.sh: line 57: /usr/local/nagios/libexec/pihole_api_getQuerySources.tmp: Permission denied
./check_pihole_api.sh: line 125: /usr/local/nagios/libexec/pihole_api_getQuerySources.tmp: No such file or directory
TOP HOSTS BY QUERIES |
$ ./check_pihole_api.sh -h localhost -s queries
DNS QUERIES TODAY |Total=
Is there a Guide for Dummies, please?
Thanks.
$ ./check_pihole_api.sh -h localhost -t
./check_pihole_api.sh: line 57: /usr/local/nagios/libexec/pihole_api_getQuerySources.tmp: Permission denied
./check_pihole_api.sh: line 125: /usr/local/nagios/libexec/pihole_api_getQuerySources.tmp: No such file or directory
TOP HOSTS BY QUERIES |
$ ./check_pihole_api.sh -h localhost -s queries
DNS QUERIES TODAY |Total=
Is there a Guide for Dummies, please?
Thanks.
Owner's reply
Hello Baqwas. I have fixed the plugin, find the latest version working with Pihole 5.17 in my github. deividgdt/nagiosplugin_piholeapi