Enable extended statistics on Synology DNS Server
178 words, 1 minutes
I installed “DNS Server beta” 1.0-0012 on my Synology DS409slim. This package ships with Bind 9.9.2. This means we should be able to gather statistics from the embedded HTTP/XML server.
Here’s how.
First of all, you need to install the “DNS Server” from the DSM Package Manager. Then, log-on to the Syno using SSH and edit the proper configuration file:
# cd /var/packages/DNSServer/target/named/etc/conf
# vi named.log.conf
(...)
statistics-channels {
inet * port 8053 allow { 192.168.0.0/24; };
};
Replace the ACL according to your needs.
Now, using the Syno Web GUI, from the Package Center, stop and start the “DNS Server” service. Issue the following command from an external allowed computer and watch the stats being displayed in XML format:
# curl http://synology:8053
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="/bind9.xsl"?>
<isc version="1.0">
<bind>
<statistics version="2.2">
<views>
<view>
<name>_default</name>
<zones>
<zone>
<name>0.IN-ADDR.ARPA/IN</name>
<rdataclass>IN</rdataclass>
<serial>0</serial>
</zone>
(...)
<summary>
<TotalUse>2836516</TotalUse>
<InUse>971812</InUse>
<BlockSize>2097152</BlockSize>
<ContextSize>178076</ContextSize>
<Lost>0</Lost>
</summary>
</memory>
</statistics>
</bind>
</isc>
The Synology is now ready to be polled for statistics usage.
Note that this tweak may be overridden after package update.
Happy graphing!