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

[Enhancement] Verbose DNS Metrics #775

Open
TheiLLeniumStudios opened this issue Nov 19, 2023 · 1 comment
Open

[Enhancement] Verbose DNS Metrics #775

TheiLLeniumStudios opened this issue Nov 19, 2023 · 1 comment

Comments

@TheiLLeniumStudios
Copy link

Hi,

I've been using gravity as my primary DNS server running on k8s with multiple replicas for a while now and it seems to work great so far.

However, it would be nice to have more verbose metrics for DNS queries. I know that the DNS queries are logged with the client IP and the request:

{"level":"info","ts":1700391001.1684859,"logger":"role.dns","msg":"DNS Query","instance":"gravity-dns-1","version":"0.6.17-2219b6b2","runtime":9,"client":"10.2.0.16","response":"NOERROR","queryNames":["mobile.events.data.microsoft.com."],"queryTypes":["A"],"answerRecords":["mobile.events.data.trafficmanager.net.","onedscolprdcus09.centralus.cloudapp.azure.com.","13.89.179.9"],"answerTypes":["CNAME","CNAME","A"]}

but having it in prometheus would be great to visualize DNS queries made per client or DNS queries made per Host etc.

@TheiLLeniumStudios TheiLLeniumStudios changed the title [Feature Request] Verbose DNS Metrics [Enhancement] Verbose DNS Metrics Nov 19, 2023
@BeryJu
Copy link
Owner

BeryJu commented Nov 19, 2023

Metrics like that are purposefully not exposed to prometheus as they have a very high cardinality, which isn't great for prometheus. Instead it is recommended to store the logs from gravity (for example with Loki) and build metrics off of that.

It might be an interesting option to leave that choice to the gravity user and optionally expose those metrics via prometheus while acknowledging the downsides (https://stackoverflow.com/questions/46373442/how-dangerous-are-high-cardinality-labels-in-prometheus)

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

2 participants