-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bind Exporter 0.6.0 not compatible with Bind version 9.18.12+ #162
Comments
also tried exporter version 0.4.0 and 0.5.0......the same behaviour....none works with bind 9.18.12+ |
Can confirm, same here. I use bind 9.19 and also not working anymore |
There are negative values in the stats_output.xml file provided by @bschoenbach : <taskmgr>
...
<tasks>
...
<task>
<name>taskpool</name>
<references>1</references>
<id>0x7fe65d766440</id>
<state>idle</state>
<quantum>-1</quantum> <--
<events>0</events>
</task>
...
</tasks> The corresponding // Task represents a single running task.
type Task struct {
ID string `xml:"id"`
Name string `xml:"name"`
Quantum uint64 `xml:"quantum"` <--
References uint64 `xml:"references"`
State string `xml:"state"`
} I am not sure how to handle that though 🤔 |
Should be easy enough to change this to an |
After testing i can confirm changing Quantum type from uint64 -> int64 fixes the problem...I will raise a pull request to master |
@SuperQ the change itself looks trivial, I was just not sure how I'd go about checking / verifying that we can actually use an |
@paketb0te Looking at the metrics/code. This value isn't used anywhere. It's just used to unmarshal the XML. |
If we don't use that value anywhere, why do we even bother unmarshalling that field? |
Probably because of the way Go does XML parsing. :-/ |
@SuperQ I don't see why there should be any issue with only declaring fields / tags that we are interested in. See https://go.dev/play/p/XoXKTcjOTQL for example. From a quick glance at the code, I suspect that bind_exporter is unmarshalling a whole bunch of stuff that it doesn't actually translate into metrics. |
Yea, I don't know the history of the XML parsing. |
Hi guys,
I noticed that starting with bind version 9.18.12+ the exporter is not capable to parse the XML output of the bind statistics channel (:8053) anymore. The exporter logs the following lines....
level=info ts=2023-03-16T13:08:31.750Z caller=bind_exporter.go:541 msg="Starting bind_exporter" version="(version=0.6.0, branch=HEAD, revision=7464905c46d60755105b3b6c25ff88e161fcae2c)" level=info ts=2023-03-16T13:08:31.750Z caller=bind_exporter.go:542 msg="Build context" build_context="(go=go1.19.3, user=root@cb284bc56c1d, date=20221110-19:23:25)" level=info ts=2023-03-16T13:08:31.750Z caller=bind_exporter.go:543 msg="Collectors enabled" collectors=server,view,tasks level=info ts=2023-03-16T13:08:31.750Z caller=tls_config.go:232 msg="Listening on" address=[::]:9119 level=info ts=2023-03-16T13:08:31.750Z caller=tls_config.go:235 msg="TLS is disabled." http2=false address=[::]:9119 level=error ts=2023-03-16T13:08:41.865Z caller=bind_exporter.go:441 msg="Couldn't retrieve BIND stats" err="failed to unmarshal XML response: strconv.ParseUint: parsing \"-1\": invalid syntax" level=error ts=2023-03-16T13:08:42.062Z caller=bind_exporter.go:441 msg="Couldn't retrieve BIND stats" err="failed to unmarshal XML response: strconv.ParseUint: parsing \"-1\": invalid syntax" level=error ts=2023-03-16T13:08:42.071Z caller=bind_exporter.go:441 msg="Couldn't retrieve BIND stats" err="failed to unmarshal XML response: strconv.ParseUint: parsing \"-1\": invalid syntax" level=error ts=2023-03-16T13:08:52.065Z caller=bind_exporter.go:441 msg="Couldn't retrieve BIND stats" err="failed to unmarshal XML response: strconv.ParseUint: parsing \"-1\": invalid syntax" level=error ts=2023-03-16T13:08:52.069Z caller=bind_exporter.go:441 msg="Couldn't retrieve BIND stats" err="failed to unmarshal XML response: strconv.ParseUint: parsing \"-1\": invalid syntax"
However, accessing the bind statistics channel manually via curl on :8053 works perfect and i can get the following xml response as you can see below attached.
stats_output.xml.txt
The only thing i noticed is that the amount of xml data is bigger on the statistic channel starting from bind 9.18.12+. Using bind 9.18.11 or older the exporter works picture perfect again
The text was updated successfully, but these errors were encountered: