From 0686ce66812aa409af102ef798c997f4feb8051c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Vavru=C5=A1a?= Date: Thu, 21 May 2015 19:55:54 +0200 Subject: [PATCH] modules/stats: updated doc on statistics --- modules/stats/README.rst | 31 ++++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/modules/stats/README.rst b/modules/stats/README.rst index 7fb2d1b06..87b91c1d4 100644 --- a/modules/stats/README.rst +++ b/modules/stats/README.rst @@ -4,22 +4,43 @@ Statistics collector -------------------- This modules gathers various counters from the query resolution and server internals, -and offers them as a key-value storage. +and offers them as a key-value storage. Any module may update the metrics or simply hook +in new ones. Properties ^^^^^^^^^^ .. function:: stats.get(key) - :param string key: i.e. ``"queries"`` + :param string key: i.e. ``"answer.total"`` :return: ``number`` -Return nominal value of given key. +Return nominal value of given metric. .. function:: stats.set(key, val) - :param string key: i.e. ``"queries"`` + :param string key: i.e. ``"answer.total"`` :param number val: i.e. ``5`` -Set nominal value of given key. +Set nominal value of given metric. +.. function:: stats.list([prefix]) + + :param string prefix: optional metric prefix, i.e. ``"answer"`` shows only metrics beginning with "answer" + +Outputs collected metrics as a JSON dictionary. + +Built-in statistics +^^^^^^^^^^^^^^^^^^^ + +* ``answer.total`` +* ``answer.cached`` +* ``answer.unresolved`` +* ``answer.noerror`` +* ``answer.nxdomain`` +* ``answer.servfail`` +* ``query.concurrent`` +* ``query.edns`` +* ``query.dnssec`` +* ``iterator.udp`` +* ``iterator.tcp`` -- 2.47.2