1
0
mirror of https://github.com/prometheus-community/bind_exporter.git synced 2025-09-17 21:42:12 +03:00

21 Commits

Author SHA1 Message Date
TJ Hoplock
4f4640e948 ci(lint): fix deprecated expfmt.FmtText usage
Signed-off-by: TJ Hoplock <t.hoplock@gmail.com>
2024-10-17 09:18:39 -04:00
TJ Hoplock
cdb9968861 chore!: adopt slog, drop go-kit/log
The bulk of this change set was automated by the following script which
is being used to aid in converting the various exporters/projects to use
slog:

https://gist.github.com/tjhop/49f96fb7ebbe55b12deee0b0312d8434

Signed-off-by: TJ Hoplock <t.hoplock@gmail.com>
2024-10-16 16:49:20 -04:00
Daniel Swarbrick
720b399467 Default to JSON statistics channel
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>
2023-08-23 12:13:25 +02:00
Daniel Swarbrick
60fe37e4ac Rename v3 fixtures directory to xml
Also add .xml extensions to fixtures to make them more editor-friendly.

Signed-off-by: Daniel Swarbrick <daniel.swarbrick@gmail.com>
2023-08-23 12:10:23 +02:00
Daniel Swarbrick
429be85677 Drop XML v2 stats support, which is deprecated
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>
2023-08-23 12:10:19 +02:00
SuperQ
e326b573cc Refactor logger
Remove global logger var in favor of passing logger from main() to the
Exporter struct.

Signed-off-by: SuperQ <superq@gmail.com>
2023-08-23 11:55:23 +02:00
Daniel Swarbrick
49da875682 Implement JSON stats v1 parsing
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>
2023-04-08 20:43:03 +02:00
Daniel Swarbrick
0d03be411c Decode resp.Body directly, without ioutil.ReadAll (#84)
* 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>
2022-09-08 12:19:00 +02:00
aauroy
b552d1956d prometheus-community/bind_exporter#124: add REFUSED label for metric bind_resolver_response_errors_total (#125)
Signed-off-by: Antonin Auroy <antonin.auroy@xmco.fr>

Co-authored-by: Antonin Auroy <antonin.auroy@xmco.fr>
2022-04-27 14:44:50 +02:00
christian-simmen
edce8721f8 Add support for RCODE metrics (#113)
* updated fixtures to version 3.8
* get RCODES

Signed-off-by: christian-simmen <christian.simmen@gmx.de>
2021-09-16 15:32:17 +02:00
Tadas
2f8cca5f19 Add zone serial numbers as metrics
Signed-off-by: Tadas <seitanas@users.noreply.github.com>
2021-01-06 14:39:57 +02:00
Mike Eves
5781126415 Add current recursive clients metric (#74)
* Add current recursive clients metric

Signed-off-by: Mike Eves <michael.eves@autotrader.co.uk>
2020-05-12 14:55:35 +02:00
Ben Kochie
dfca559f0f Update build
* 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>
2020-01-05 10:30:56 +01:00
Mike Eves
9289b40af6 Support zone stats, enable some initial zone transfer metrics (#49)
* Support zone stats, enable some initial zone transfer metrics

* Remove unnecessary import aliases
2019-02-26 09:27:58 -05:00
Tobias Schmidt
d36683a232 Export boot and config time gauges
Fixes #14.
2016-09-14 21:24:44 -04:00
Tobias Schmidt
baccd2537b Export queries causing recursion as bind_query_recursions_total
Fixes #12.
2016-09-14 21:24:44 -04:00
Tobias Schmidt
af0c7ec527 Export duplicated queries as bind_query_duplicates_total metric
Duplicated queries are not an error and should not be exported as such.

Fixes #12.
2016-09-14 21:24:44 -04:00
Tobias Schmidt
954cd66a8e Add automatic statitics version detection
If -bind.stats-version is left to auto, both XML v2 and v3 versions will be handled gracefully.
2016-09-10 17:57:22 -04:00
Tobias Schmidt
a84d60c35f Implement support for BIND statistics v3
* Provide option to control exported statistics
2016-09-10 17:55:02 -04:00
Tobias Schmidt
e141d9013a Extract bind statistics parsing in sub-packages
This prepares the addition of statistics v3 parsing.
2016-09-10 17:49:11 -04:00
Tobias Schmidt
9e8b7a09a6 Clean up build and test setup
* Replace Makefile.COMMON approach with promu
* Upgraded example app (which wasn't compiling) to a first test function
2016-09-10 17:49:05 -04:00