From: Charles-Henri Bruyand Date: Thu, 2 Jun 2022 13:48:19 +0000 (+0200) Subject: dnsdist: fix custom metrics documentation X-Git-Tag: auth-4.8.0-alpha0~79^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aaf630b18d44cd85be4d2be03651e653acb8a521;p=thirdparty%2Fpdns.git dnsdist: fix custom metrics documentation --- diff --git a/pdns/dnsdistdist/docs/reference/custommetrics.rst b/pdns/dnsdistdist/docs/reference/custommetrics.rst index 22e0071606..c29cfd0911 100644 --- a/pdns/dnsdistdist/docs/reference/custommetrics.rst +++ b/pdns/dnsdistdist/docs/reference/custommetrics.rst @@ -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 - - -