8000 Update bind plugin to support the new XML v3 API. by elinorbgr · Pull Request #742 · collectd/collectd · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Update bind plugin to support the new XML v3 API. #742

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

Merged
merged 2 commits into from
Sep 22, 2014
Merged

Update bind plugin to support the new XML v3 API. #742

merged 2 commits into from
Sep 22, 2014

Conversation

elinorbgr
Copy link
Contributor

This commit adds support for the new XML schema of Bind9 statistics-channels (version 3). This new schema is the default one in Bind9.9 (can be reverted to v2 with a ./configure switch) and support for older versions has been dropped in Bind9.10.

Support for versions 1 and 2 remain in the collectd plugin.

Unfortunately, this new schema does not provide per-zone data any more, thus 'Zone' options like

Zone "example.com/IN"

are ignored if schema version is 3.

Before this, a v3 schema was silently failed with only read-function of plugin bind' failed.`.

Unfortunately, this new API does not provide per-zone data
any more, thus 'Zone' options like

     Zone "example.com/IN"

are ignored if API version is 3.
@octo octo added the Feature label Sep 22, 2014
if (child->type != XML_ELEMENT_NODE)
continue;

if (strncmp ("counter", (char *) child->name, strlen ("counter")) == 0)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you change this logic to the following to save one level of indentation?

if (strncmp ("counter", (char *) child->name, strlen ("counter")) != 0)
  continue;

@elinorbgr
Copy link
Contributor Author

@octo is this what you had in mind ?

And minor change to bind_parse_generic_name_attr_value_list.
@octo octo merged commit 32d5f1a into collectd:master Sep 22, 2014
@octo
Copy link
Member
octo commented Sep 22, 2014

Awesome, thanks @vberger!

@johntdyer
Copy link

Doesn't look like this made it into the changelog for 5.4.2. Any reason why?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0