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

Fix query counts #1322

Merged
merged 2 commits into from
Apr 2, 2022
Merged

Fix query counts #1322

merged 2 commits into from
Apr 2, 2022

Conversation

DL6ER
Copy link
Member

@DL6ER DL6ER commented Mar 26, 2022

By submitting this pull request, I confirm the following:

  • I have read and understood the contributors guide.
  • I have checked that another pull request for this purpose does not exist.
  • I have considered, and confirmed that this submission will be valuable to others.
  • I accept that this submission may not be used, and the pull request closed at the will of the maintainer.
  • I give this submission freely, and claim no ownership to its content.

How familiar are you with the codebase?:

10


Further fixes to ensure the independent quantities dns_queries_today, dns_queries_all_types and the newly introduced dns_queries_all_replies are indeed identical. See #1315 for further details.

@DL6ER DL6ER added the Bugfix label Mar 26, 2022
@DL6ER DL6ER requested a review from yubiuser March 26, 2022 12:21
DL6ER added 2 commits March 26, 2022 13:22
…e we subtract from the previous reply counter when setting a new status

Signed-off-by: DL6ER <dl6er@dl6er.de>
@DL6ER DL6ER force-pushed the fix/negative_replies branch from 83227e0 to 8734b60 Compare March 26, 2022 12:24
@DL6ER
Copy link
Member Author

DL6ER commented Mar 26, 2022

Force-pushed to reword commit messages, no code changes involved.

@DL6ER DL6ER linked an issue Mar 26, 2022 that may be closed by this pull request
@DL6ER
Copy link
Member Author

DL6ER commented Apr 2, 2022

Confirmed working. All three numbers still match on my Pi-hole after 7 days of uninterrupted operation.

{
        "domains_being_blocked": 185134,
        "dns_queries_today": 22678,          <-------------------
        "ads_blocked_today": 2027,
        "ads_percentage_today": 8.938178,
        "unique_domains": 3613,
        "queries_forwarded": 9791,
        "queries_cached": 10633,
        "clients_ever_seen": 83,
        "unique_clients": 28,
        "dns_queries_all_types": 22678,      <-------------------
        "reply_UNKNOWN": 313,
        "reply_NODATA": 6403,
        "reply_NXDOMAIN": 214,
        "reply_CNAME": 2659,
        "reply_IP": 12272,
        "reply_DOMAIN": 288,
        "reply_RRNAME": 9,
        "reply_SERVFAIL": 0,
        "reply_REFUSED": 0,
        "reply_NOTIMP": 0,
        "reply_OTHER": 0,
        "reply_DNSSEC": 520,
        "reply_NONE": 0,
        "reply_BLOB": 0,
        "dns_queries_all_replies": 22678,    <-------------------
        "privacy_level": 0,
        "status": "enabled",
        "gravity_last_updated": {
                "file_exists": true,
                "absolute": 1648348866,
                "relative": {
                        "days": 6,
                        "hours": 9,
                        "minutes": 43
                }
        }
}

@yubiuser yubiuser merged commit 4f6f6ca into development Apr 2, 2022
@yubiuser yubiuser deleted the fix/negative_replies branch April 2, 2022 18:20
@pralor-bot
Copy link

This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there:

https://discourse.pi-hole.net/t/pi-hole-ftl-v5-15-web-v5-12-and-core-v5-10-released/54987/1

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.

API returns negative values for some reply types
3 participants