]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
auth: Declare ring-capacity metrics as gauges.
authorMischan Toosarani-Hausberger <migosch@gmail.com>
Thu, 4 Jun 2020 17:26:05 +0000 (19:26 +0200)
committerMischan Toosarani-Hausberger <migosch@gmail.com>
Fri, 5 Jun 2020 21:28:18 +0000 (23:28 +0200)
docs/http-api/index.rst
pdns/statbag.cc

index 81ee64ea17e9f8eb598334ce13074bac3218c539..b55be7f1104570d0aca8352a7e01f31f167a24c2 100644 (file)
@@ -199,34 +199,34 @@ A simple ``GET`` request will return a response similar to the following:
   # TYPE pdns_auth_real_memory_usage gauge
   pdns_auth_real_memory_usage 133189632
   # HELP pdns_auth_ring_logmessages_capacity Maximum number of entries in the logmessages ring
-  # TYPE pdns_auth_ring_logmessages_capacity counter
+  # TYPE pdns_auth_ring_logmessages_capacity gauge
   pdns_auth_ring_logmessages_capacity 10000
   # HELP pdns_auth_ring_logmessages_size Number of entries in the logmessages ring
   # TYPE pdns_auth_ring_logmessages_size counter
   pdns_auth_ring_logmessages_size 7
   # HELP pdns_auth_ring_noerror_queries_capacity Maximum number of entries in the noerror-queries ring
-  # TYPE pdns_auth_ring_noerror_queries_capacity counter
+  # TYPE pdns_auth_ring_noerror_queries_capacity gauge
   pdns_auth_ring_noerror_queries_capacity 10000
   # HELP pdns_auth_ring_noerror_queries_size Number of entries in the noerror-queries ring
   # TYPE pdns_auth_ring_noerror_queries_size counter
   pdns_auth_ring_noerror_queries_size 0
   # HELP pdns_auth_ring_nxdomain_queries_capacity Maximum number of entries in the nxdomain-queries ring
-  # TYPE pdns_auth_ring_nxdomain_queries_capacity counter
+  # TYPE pdns_auth_ring_nxdomain_queries_capacity gauge
   pdns_auth_ring_nxdomain_queries_capacity 10000
   # HELP pdns_auth_ring_nxdomain_queries_size Number of entries in the nxdomain-queries ring
   # TYPE pdns_auth_ring_nxdomain_queries_size counter
   pdns_auth_ring_nxdomain_queries_size 0
   # HELP pdns_auth_ring_queries_capacity Maximum number of entries in the queries ring
-  # TYPE pdns_auth_ring_queries_capacity counter
+  # TYPE pdns_auth_ring_queries_capacity gauge
   pdns_auth_ring_queries_capacity 10000
   # HELP pdns_auth_ring_queries_size Number of entries in the queries ring
   # TYPE pdns_auth_ring_queries_size counter
   pdns_auth_ring_queries_size 0
   # HELP pdns_auth_ring_remotes_capacity Maximum number of entries in the remotes ring
-  # TYPE pdns_auth_ring_remotes_capacity counter
+  # TYPE pdns_auth_ring_remotes_capacity gauge
   pdns_auth_ring_remotes_capacity 10000
   # HELP pdns_auth_ring_remotes_corrupt_capacity Maximum number of entries in the remotes-corrupt ring
-  # TYPE pdns_auth_ring_remotes_corrupt_capacity counter
+  # TYPE pdns_auth_ring_remotes_corrupt_capacity gauge
   pdns_auth_ring_remotes_corrupt_capacity 10000
   # HELP pdns_auth_ring_remotes_corrupt_size Number of entries in the remotes-corrupt ring
   # TYPE pdns_auth_ring_remotes_corrupt_size counter
@@ -235,19 +235,19 @@ A simple ``GET`` request will return a response similar to the following:
   # TYPE pdns_auth_ring_remotes_size counter
   pdns_auth_ring_remotes_size 0
   # HELP pdns_auth_ring_remotes_unauth_capacity Maximum number of entries in the remotes-unauth ring
-  # TYPE pdns_auth_ring_remotes_unauth_capacity counter
+  # TYPE pdns_auth_ring_remotes_unauth_capacity gauge
   pdns_auth_ring_remotes_unauth_capacity 10000
   # HELP pdns_auth_ring_remotes_unauth_size Number of entries in the remotes-unauth ring
   # TYPE pdns_auth_ring_remotes_unauth_size counter
   pdns_auth_ring_remotes_unauth_size 0
   # HELP pdns_auth_ring_servfail_queries_capacity Maximum number of entries in the servfail-queries ring
-  # TYPE pdns_auth_ring_servfail_queries_capacity counter
+  # TYPE pdns_auth_ring_servfail_queries_capacity gauge
   pdns_auth_ring_servfail_queries_capacity 10000
   # HELP pdns_auth_ring_servfail_queries_size Number of entries in the servfail-queries ring
   # TYPE pdns_auth_ring_servfail_queries_size counter
   pdns_auth_ring_servfail_queries_size 0
   # HELP pdns_auth_ring_unauth_queries_capacity Maximum number of entries in the unauth-queries ring
-  # TYPE pdns_auth_ring_unauth_queries_capacity counter
+  # TYPE pdns_auth_ring_unauth_queries_capacity gauge
   pdns_auth_ring_unauth_queries_capacity 10000
   # HELP pdns_auth_ring_unauth_queries_size Number of entries in the unauth-queries ring
   # TYPE pdns_auth_ring_unauth_queries_size counter
index 70eddcb2445946e4d8ec92cb60000042103fcba7..9f2814aeab8379eb32118f2c01f295f0f41d20f4 100644 (file)
@@ -245,7 +245,7 @@ vector<pair<T, unsigned int> >StatRing<T,Comp>::get() const
 void StatBag::registerRingStats(const string& name)
 {
   declare("ring-" + name + "-size", "Number of entries in the " + name + " ring", [this,name](const std::string&) { return static_cast<uint64_t>(getRingEntriesCount(name)); }, StatType::counter);
-  declare("ring-" + name + "-capacity", "Maximum number of entries in the " + name + " ring", [this,name](const std::string&) { return static_cast<uint64_t>(getRingSize(name)); }, StatType::counter);
+  declare("ring-" + name + "-capacity", "Maximum number of entries in the " + name + " ring", [this,name](const std::string&) { return static_cast<uint64_t>(getRingSize(name)); }, StatType::gauge);
 }
 
 void StatBag::declareRing(const string &name, const string &help, unsigned int size)