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

dnsdist: add frontend response statistics #7578

merged 1 commit into from Apr 4, 2019


Copy link

@qvr qvr commented Mar 14, 2019

Short description

Adds new global "frontend" stats for noerror, nxdomain and servfail answers sent to clients (like in the recursor).

If using cache in dnsdist you otherwise lose visibility of the types of answers sent from there.

Stat names are up for discussion, the term frontend seems to be used elsewhere as well. Perhaps servfail-responses and responses should be renamed to backend-* ?


I have:

  • read the document
  • compiled this code
  • tested this code
  • included documentation (including possible behaviour changes)
  • documented the code
  • added or modified regression test(s)
  • added or modified unit test(s)
Copy link

@rgacogne rgacogne left a comment

Looks good, thanks a lot!
One remark that doesn't prevent merging this, the new stats are not exported over SNMP.

@rgacogne rgacogne added this to the dnsdist-1.3.x milestone Mar 14, 2019
@qvr qvr force-pushed the qvr:addtl-gstats branch from c317089 to d058507 Mar 15, 2019
Copy link
Contributor Author

@qvr qvr commented Mar 15, 2019

You're right, and it was also missing prometheus export. I hooked that up now, but the SNMP part seems scary due to the needed MIB changes.

@qvr qvr force-pushed the qvr:addtl-gstats branch from d058507 to 666e341 Mar 15, 2019
Copy link

@rgacogne rgacogne commented Mar 18, 2019

Regression tests are failing because of the new metrics showing up in the API output:

FAIL: API: /api/v1/servers/localhost/statistics
Traceback (most recent call last):
  File "/home/travis/build/PowerDNS/pdns/regression-tests.dnsdist/", line 243, in testServersLocalhostStatistics
    self.assertIn(key, expected)
AssertionError: u'frontend-nxdomain' not found in ['responses', 'servfail-responses', 'queries', 'acl-drops', 'rule-drop', 'rule-nxdomain', 'rule-refused', 'self-answered', 'downstream-timeouts', 'downstream-send-errors', 'trunc-failures', 'no-policy', 'latency0-1', 'latency1-10', 'latency10-50', 'latency50-100', 'latency100-1000', 'latency-slow', 'latency-avg100', 'latency-avg1000', 'latency-avg10000', 'latency-avg1000000', 'uptime', 'real-memory-usage', 'noncompliant-queries', 'noncompliant-responses', 'rdqueries', 'empty-queries', 'cache-hits', 'cache-misses', 'cpu-user-msec', 'cpu-sys-msec', 'fd-usage', 'dyn-blocked', 'dyn-block-nmg-size', 'rule-servfail', 'security-status']

Let me now if you want some help :-)

@qvr qvr force-pushed the qvr:addtl-gstats branch from 666e341 to 61d10a4 Mar 18, 2019
Copy link
Contributor Author

@qvr qvr commented Mar 18, 2019

Thanks for the heads-up, tests fixed!

@rgacogne rgacogne merged commit 3811914 into PowerDNS:master Apr 4, 2019
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants