Skip to content
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

Discover Zones Issue #9

Open
marinoborges opened this issue Dec 10, 2019 · 0 comments
Open

Discover Zones Issue #9

marinoborges opened this issue Dec 10, 2019 · 0 comments

Comments

@marinoborges
Copy link

I was receiving an empty result when using bind-stats.py with discoverzones parameter (stats version 2). I used 'wget -O - http://localhost:8654 | xml2' to debug and realized that it was needed to comment line 79 of the code to achieve the proper result.

77 if version == 2:
78 for view in root.iterfind('./bind/statistics/views/view'):
79 # if view.findtext('./name') in ('_default',):
80 for zone in view.iterfind('./zones/zone'):
81 if zone.find('./counters') is not None:
82 counters = {}
83 for counter in zone.iterfind('./counters/*'):
84 counters[counter.tag] = counter.text
85 j['zones'][zone.findtext('./name')] = counters

Now I'm wondering in which case this line was needed.

Version and build parameters:

named -V
BIND 9.8.4-rpz2+rl005.12-P1 built with '--prefix=/usr' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--sysconfdir=/etc/bind' '--localstatedir=/var' '--enable-threads' '--enable-largefile' '--with-libtool' '--enable-shared' '--enable-static' '--with-openssl=/usr' '--with-gssapi=/usr' '--with-gnu-ld' '--with-geoip=/usr' '--enable-ipv6' 'CFLAGS=-fno-strict-aliasing -DDIG_SIGCHASE -O2'
using OpenSSL version: OpenSSL 1.0.1e 11 Feb 2013
using libxml2 version: 2.8.0

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

No branches or pull requests

1 participant