FS#48001 - [bind] compile with libjson to get statistics channel in json

Attached to Project: Arch Linux
Opened by Costa Tsaousis (ktsaou) - Wednesday, 03 February 2016, 00:49 GMT
Last edited by Doug Newgard (Scimmia) - Saturday, 06 February 2016, 15:10 GMT
Task Type Feature Request
Category Packages: Extra
Status Closed
Assigned To Sébastien Luttringer (seblu)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

bind should be compiled with --with-libjson to provide its statistics channel in JSON.

This is needed for performance monitoring bind with tools like netdata (https://github.com/firehol/netdata/wiki/named.node.js)

Additional info:
* package version(s)
* config and/or log files etc.

named.conf to enable statistics channel:

statistics-channels {
inet 127.0.0.1 port 8888 allow { 127.0.0.1; };
inet ::1 port 8888 allow { ::1; };
};


Steps to reproduce:

Once the statistics channel has been configured, run this:

curl "http://localhost:8888/json/v1/server"

bind responds with 404, not found.

If it was compiled with --with-libjson, it would respond with a JSON object.
This task depends upon

Closed by  Doug Newgard (Scimmia)
Saturday, 06 February 2016, 15:10 GMT
Reason for closing:  Fixed
Comment by Costa Tsaousis (ktsaou) - Saturday, 06 February 2016, 07:30 GMT
  • Field changed: Percent Complete (100% → 0%)
Thanks. But now it crashes when you run the curl command given in the description. It works if you request an /xml/v3/server. It crashes with /json/v1/server.
Comment by Sébastien Luttringer (seblu) - Saturday, 06 February 2016, 11:26 GMT
both works for me, no crash.

# pacman -Q bind
bind 9.10.3.P3-3
achille /etc # curl "http://localhost:8888/json/v1/server" > /dev/null
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1760 100 1760 0 0 341k 0 --:--:-- --:--:-- --:--:-- 429k
achille /etc # systemctl status -n 0 named
● named.service - Internet domain name server
Loaded: loaded (/usr/lib/systemd/system/named.service; enabled; vendor preset: disabled)
Active: active (running) since sam. 2016-02-06 12:23:01 CET; 11s ago
Process: 1906 ExecStop=/usr/bin/rndc stop (code=exited, status=0/SUCCESS)
Main PID: 1912 (named)
Tasks: 7 (limit: 512)
CGroup: /system.slice/named.service
└─1912 /usr/bin/named -f -u named

Maybe you have a specific config which leads to the crash. Please report that crashes upstream, they may be interested by a dns server crash ;)
Comment by Costa Tsaousis (ktsaou) - Saturday, 06 February 2016, 13:55 GMT
ok, I updated the whole system and restarted bind.
Now, it works.
Sorry for the false alarm.

Loading...