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: metrics should report dnsdist_server_up #8746

hhoffstaette opened this issue Jan 27, 2020 · 1 comment · Fixed by #8772

dnsdist: metrics should report dnsdist_server_up #8746

hhoffstaette opened this issue Jan 27, 2020 · 1 comment · Fixed by #8772


Copy link

@hhoffstaette hhoffstaette commented Jan 27, 2020

I'm successfully scraping Prometheus metrics from dnsdist 1.4.0 and was surprised to not find a way to create alerts on prolonged upstream server outages. Various workarounds are possible, but the canonical way would be a dnsdist_server_up{address=..} indicating 0/1 for down/up, respectively.

Copy link
Contributor Author

@hhoffstaette hhoffstaette commented Feb 3, 2020

Oh look! I just decided to tackle this since I figured it wasn't too difficult (which it wasn't, 90% was finding the server status definition), and now we crossed the streams. :)
Looks like other than naming the value our patches are the same.
FWIW you don't have to manually convert the boolean to 0/1, as the gauge will do that automatically:

$curl -s http://admin:admin@tux:9983/metrics | grep "dnsdist_server_up" 
# HELP dnsdist_server_up Value is 1 if server is 'up', 0 otherwise.
# TYPE dnsdist_server_up gauge
dnsdist_server_up{server="192_168_100_200:53",address=""} 1

Anyway, either patch is fine and will do the trick - Thank You!

hhoffstaette added a commit to hhoffstaette/portage that referenced this issue Feb 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

Successfully merging a pull request may close this issue.

2 participants