]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist: fix custom metrics documentation
authorCharles-Henri Bruyand <charles-henri.bruyand@open-xchange.com>
Thu, 2 Jun 2022 13:48:19 +0000 (15:48 +0200)
committerCharles-Henri Bruyand <charles-henri.bruyand@open-xchange.com>
Thu, 2 Jun 2022 13:48:19 +0000 (15:48 +0200)
pdns/dnsdistdist/docs/reference/custommetrics.rst

index 22e0071606c22f198e4a79b6d8e1a95ed13d2fd9..c29cfd091190ae9cd568f47dc577b7bf4dbd1fb7 100644 (file)
@@ -1,7 +1,7 @@
 Custom Metrics
 =====================================
 
-You can define at configuration time your own metrics that can be updated using lua.
+You can define at configuration time your own metrics that can be updated using Lua.
 
 The first step is to declare a new metric using :func:`declareMetric`.
 
@@ -12,16 +12,16 @@ Then you can update those at runtime using the following functions, depending on
 
 .. function:: declareMetric(name, type) -> bool
 
-  .. versionadded:: 1.x
+  .. versionadded:: 1.8.0
 
   Return true if declaration was successful
 
-  :param str name: The name of the metric, lowercase alnum characters only
+  :param str name: The name of the metric, lowercase alphanumerical characters and dashes (-) only
   :param str type: The desired type in ``gauge`` or ``counter``
 
 .. function:: incMetric(name) -> int
 
-  .. versionadded:: 1.x
+  .. versionadded:: 1.8.0
 
   Increment counter by one, will issue an error if the metric is not declared or not a ``counter``
   Return the new value
@@ -30,7 +30,7 @@ Then you can update those at runtime using the following functions, depending on
 
 .. function:: decMetric(name) -> int
 
-  .. versionadded:: 1.x
+  .. versionadded:: 1.8.0
 
   Decrement counter by one, will issue an error if the metric is not declared or not a ``counter``
   Return the new value
@@ -39,7 +39,7 @@ Then you can update those at runtime using the following functions, depending on
 
 .. function:: getMetric(name) -> double
 
-  .. versionadded:: 1.x
+  .. versionadded:: 1.8.0
 
   Get metric value
 
@@ -47,12 +47,9 @@ Then you can update those at runtime using the following functions, depending on
 
 .. function:: setMetric(name, value) -> double
 
-  .. versionadded:: 1.x
+  .. versionadded:: 1.8.0
 
-  Decrement counter by one, will issue an error if the metric is not declared or not a ``counter``
+  Set the new value, will issue an error if the metric is not declared or not a ``gauge``
   Return the new value
 
   :param str name: The name of the metric
-
-
-