From: Pieter Lexis Date: Wed, 17 Jun 2020 12:14:37 +0000 (+0200) Subject: dnsdist: Add prometheus metric for version number X-Git-Tag: dnsdist-1.5.0-rc4~18^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=560da9412218ec012fcd4e217a0dbd2de40b4ada;p=thirdparty%2Fpdns.git dnsdist: Add prometheus metric for version number --- diff --git a/pdns/dnsdist-web.cc b/pdns/dnsdist-web.cc index 5a738ca0ac..92208c5434 100644 --- a/pdns/dnsdist-web.cc +++ b/pdns/dnsdist-web.cc @@ -804,6 +804,10 @@ static void connectionThread(int sock, ComboAddress remote) } } + output << "# HELP dnsdist_info " << "Info from dnsdist, value is always 1" << "\n"; + output << "# TYPE dnsdist_info " << "gauge" << "\n"; + output << "dnsdist_info{version=\"" << VERSION << "\"} " << "1" << "\n"; + resp.body = output.str(); resp.headers["Content-Type"] = "text/plain"; }