This method utilises Bind 9s built in statistics export via HTTP/XML.
Most statistics available are collected, several aggregate graphs are defined.
Forked from https://github.com/Pesticles/Zabbix-Bind9-Statistics-Collection
- Zabbix 4.X / Zabbix 5.X
- Python 3
- Configure Bind to export statistics via HTTP by adding the following to your named.conf and restarting bind:
statistics-channels {
inet 127.0.0.1 port 58053 allow { 127.0.0.1; };
};
- Copy the userparameter_rr_bind.conf into your zabbix agents include directory (/etc/zabbix/zabbix_agentd.d/ on Debian 10)
- Copy the script bind-stats-rr.py to /etc/zabbix/script/ userparameter_bind.conf)
- Import the xml template into Zabbix
cd /etc/zabbix/zabbix_agentd.conf.d
wget https://raw.githubusercontent.com/remontti/Zabbix-Bind9-Statistics-Collection/master/userparameter_rr_bind.conf
mkdir /etc/zabbix/script
cd /etc/zabbix/script
wget https://raw.githubusercontent.com/remontti/Zabbix-Bind9-Statistics-Collection/master/bind-stats-rr.py
chmod a+x /etc/zabbix/script/bind-stats-rr.py
chown zabbix. /etc/zabbix/script/ -R
You can enable per-zone statistics (which will be automatically discovered) by adding the following clause to each zone definition in your named.conf.local:
zone-statistics yes;