From: Pieter Lexis Date: Wed, 17 Jun 2020 12:26:25 +0000 (+0200) Subject: rec: Add version info to prometheus statistics X-Git-Tag: dnsdist-1.5.0-rc4~18^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4151ddba2d2d07f83bc7eb8214c9611e4fa06a3e;p=thirdparty%2Fpdns.git rec: Add version info to prometheus statistics --- diff --git a/pdns/ws-recursor.cc b/pdns/ws-recursor.cc index a074460c2f..7237596e1d 100644 --- a/pdns/ws-recursor.cc +++ b/pdns/ws-recursor.cc @@ -458,6 +458,10 @@ static void prometheusMetrics(HttpRequest *req, HttpResponse *resp) { output << prometheusMetricName << " " << tup.second << "\n"; } + output << "# HELP pdns_recursor_info " << "Info from pdns_recursor, value is always 1" << "\n"; + output << "# TYPE pdns_recursor_info " << "gauge" << "\n"; + output << "pdns_recursor_info{version=\"" << VERSION << "\"} " << "1" << "\n"; + resp->body = output.str(); resp->headers["Content-Type"] = "text/plain"; resp->status = 200;