From: Pieter Lexis Date: Wed, 17 Jun 2020 12:28:03 +0000 (+0200) Subject: auth: Add version as prometheus metric X-Git-Tag: dnsdist-1.5.0-rc4~18^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F9252%2Fhead;p=thirdparty%2Fpdns.git auth: Add version as prometheus metric --- diff --git a/pdns/ws-auth.cc b/pdns/ws-auth.cc index 078a96cf3c..4209eae058 100644 --- a/pdns/ws-auth.cc +++ b/pdns/ws-auth.cc @@ -2274,6 +2274,10 @@ static void prometheusMetrics(HttpRequest* req, HttpResponse* resp) { output << prometheusMetricName << " " << S.read(metricName) << "\n"; } + output << "# HELP pdns_auth_info " << "Info from PowerDNS, value is always 1" << "\n"; + output << "# TYPE pdns_auth_info " << "gauge" << "\n"; + output << "pdns_auth_info{version=\"" << VERSION << "\"} " << "1" << "\n"; + resp->body = output.str(); resp->headers["Content-Type"] = "text/plain"; resp->status = 200;