]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
doc: updated doc for new modules
authorMarek Vavruša <marek.vavrusa@nic.cz>
Mon, 25 May 2015 11:26:12 +0000 (13:26 +0200)
committerMarek Vavruša <marek.vavrusa@nic.cz>
Mon, 25 May 2015 11:49:18 +0000 (13:49 +0200)
doc/modules.rst
modules/graphite/README.rst
modules/stats/README.rst

index adc515ab8d7c48e2cdd208443ec1ae188d040a79..237751ead65f8d03ea57fb7bcbebdf5f96681d19 100644 (file)
@@ -10,5 +10,7 @@ Implemented modules
    :local:
 
 .. include:: ../modules/hints/README.rst
+.. include:: ../modules/stats/README.rst
 .. include:: ../modules/cachectl/README.rst
-.. include:: ../modules/ketcd/README.rst
\ No newline at end of file
+.. include:: ../modules/graphite/README.rst
+.. include:: ../modules/ketcd/README.rst
index da6e3b0950fd8944de8a6de5d01438b991cfdc3b..783baf6e57a805cd354ca2251b2cfcc9f45a65f6 100644 (file)
@@ -25,7 +25,7 @@ Only the ``host`` parameter is mandatory.
                }
        }
 
-The module support sending data to multiple servers at once.
+The module supports sending data to multiple servers at once.
 
 .. code-block:: lua
 
index 87b91c1d49538f80bb57533cca49427416826df7..3937c96b07ac1b5a3c6df208336f663b22f1f3b9 100644 (file)
@@ -7,6 +7,27 @@ This modules gathers various counters from the query resolution and server inter
 and offers them as a key-value storage. Any module may update the metrics or simply hook
 in new ones.
 
+.. code-block:: lua
+
+       -- Enumerate metrics
+       > stats.list()
+       [answer.cached] => 486178
+       [iterator.tcp] => 490
+       [answer.noerror] => 507367
+       [answer.total] => 618631
+       [iterator.udp] => 102408
+       [query.concurrent] => 149
+
+       -- Query metrics by prefix
+       > stats.list('iter')
+       [iterator.udp] => 105104
+       [iterator.tcp] => 490
+
+       -- Set custom metrics from modules
+       > stats['filter.match'] = 5
+       > stats['filter.match']
+       5
+
 Properties
 ^^^^^^^^^^
 
@@ -33,14 +54,16 @@ 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``
+* ``answer.total`` - total number of answerered queries
+* ``answer.cached`` - number of queries answered from cache
+* ``answer.unresolved`` - number of unresolved queries (likely unresolvable path)
+* ``answer.noerror`` - number of **NOERROR** answers
+* ``answer.nxdomain`` - number of **NXDOMAIN** answers
+* ``answer.servfail`` - number of **SERVFAIL** answers
+* ``query.concurrent`` - number of concurrent queries at the moment
+* ``query.edns`` - number of queries with EDNS
+* ``query.dnssec`` - number of queries with DNSSEC DO=1
+* ``iterator.udp`` - number of outbound queries over UDP
+* ``iterator.tcp`` - number of outbound queries over TCP
+
+  * Note that the iterator tracks **completed** queries over given protocol, total number of outbound requests must be tracked by the I/O layer.