This also drops support for "auto" determination of stats version, which
is too tightly coupled to the XML stats channel to easily support JSON
too. It is essentially redundant anyway, since the JSON stats channel is
supported and always present since BIND v9.10.0.
We also no longer unmarshal the memory or socketmgr nodes of the XML
stats, since we don't currently expose any metrics for these, and they
have been responsible for unmarshal errors in the past. Once we actually
_do_ expose metrics for them, they should be included in tests.
Signed-off-by: Daniel Swarbrick <daniel.swarbrick@gmail.com>
XML v2 stats was deprecated in BIND v9.10.0, which was itself EOL'd in
July 2018.
Closes: #170
Signed-off-by: Daniel Swarbrick <daniel.swarbrick@gmail.com>
This implements support for parsing the BIND statistics exposed under
the /json/v1 endpoint.
It must be explicitly enabled with --bind.stats-version=json
Fixes: #82
Signed-off-by: Daniel Swarbrick <daniel.swarbrick@gmail.com>
* Decode resp.Body directly, without ioutil.ReadAll
Signed-off-by: Daniel Swarbrick <daniel.swarbrick@cloud.ionos.com>
* Increase timeout to get around flaky test
When checking for race conditions, the concurrency seems to result in
the XML unmarshalling taking longer than usual, so we need to be a bit
more liberal with the timeout.
Signed-off-by: Daniel Swarbrick <daniel.swarbrick@gmail.com>
Signed-off-by: Daniel Swarbrick <daniel.swarbrick@cloud.ionos.com>
Signed-off-by: Daniel Swarbrick <daniel.swarbrick@gmail.com>
* Update to Go modules.
* Update all vendoring.
* Fix up prometheus client_golang use.
* Convert from Travis to CircleCI build pipeline.
* Update promu.yml
* Update github repo locations.
* Use Prometheus common Makefile.
* Add missing license headers.
Signed-off-by: Ben Kochie <superq@gmail.com>