From aaf630b18d44cd85be4d2be03651e653acb8a521 Mon Sep 17 00:00:00 2001 From: Charles-Henri Bruyand Date: Thu, 2 Jun 2022 15:48:19 +0200 Subject: [PATCH] dnsdist: fix custom metrics documentation --- .../docs/reference/custommetrics.rst | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) 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 - - - -- 2.47.2