chvvkumar / Monitoring

Monitor ESXi, Synology, Docker, PiHole and Raspberry Pi and Windows using Grafana, InfluxDB and Telegraf

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

native method of calling pihole for stats

zfouts opened this issue · comments

commented

Hello,

While implementing this on my own, I discovered you can actually call the API directly from telegraf, no longer requiring a shell/python script. Please see below:

# PiHole monitoring
[[inputs.httpjson]]
  name = "pihole1_stats"
  servers = [
    "http://pihole.example.com/admin/api.php",
  ]
  response_timeout = "5s"
  method = "GET"

@zfouts

Interesting! Thank you for pointing that out. I will test that tonight and push the changes after.

Added in 70ce201

I also updated the dashboard along with the change.

commented

Awesome :) Glad to help @chvvkumar!