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

Choose a reason for hiding this comment

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

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

Copy link
Contributor Author

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.

Copy link

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 :-)

Copy link
Contributor Author

qvr commented Mar 18, 2019

Thanks for the heads-up, tests fixed!

@rgacogne rgacogne merged commit 3811914 into PowerDNS:master Apr 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

Successfully merging this pull request may close these issues.

None yet

2 participants