]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist: Add prometheus metric for version number
authorPieter Lexis <pieter.lexis@powerdns.com>
Wed, 17 Jun 2020 12:14:37 +0000 (14:14 +0200)
committerPieter Lexis <pieter.lexis@powerdns.com>
Wed, 17 Jun 2020 12:14:37 +0000 (14:14 +0200)
pdns/dnsdist-web.cc

index 5a738ca0ac5af60a616b91e14943e25deca45f8e..92208c54345d02fb621b383c7242bf6aa48f395e 100644 (file)
@@ -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";
     }