Sending Pi-hole metrics to Graylog with Zabbix
In early 2021 I wrote about capturing detailed pihole metrics with telegraf and influxdb to create Grafana Dashboards. I’ve moved to Graylog for logging and Zabbix for fault and performance management so I decide to revisit this implementation and migrate this capability from the original TIG stack to Graylog using the Zabbix agent for monitoring and triggering the data load.
Original Design
My original implementation extracted data from the pihole FTL sqlite database with a shell script and converted each row to a Influxdb line protocol compatible with telegraph exec plugin.
sqlite3 ->shell script->telegraf->influxdb
The shell script was invoked by the telegraf agent and produced output that was sent to influxdb. I was happy with the result and built a dashboard in Grafana to see the data. This design worked for a while until I ran into cardinality issues with Influxdb in late 2021. This is not a limitation of influxdb but a result of my poor design. When I created the database in influxdb, I neglected to set a retention period and reached the max-values-per-tag
limit of 100000 in a few months.
Influxdb announced v2 in late 2020 and was encouraging people to move to this version. I wanted to migrate to this version based on other features I had read…