]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
start to document the jsonstat
authorphonedph1 <phoned@gmail.com>
Wed, 3 Apr 2019 18:53:40 +0000 (18:53 +0000)
committerphonedph1 <phoned@gmail.com>
Wed, 3 Apr 2019 18:53:40 +0000 (18:53 +0000)
pdns/recursordist/docs/http-api/endpoint-jsonstat.rst [new file with mode: 0644]
pdns/recursordist/docs/http-api/index.rst

diff --git a/pdns/recursordist/docs/http-api/endpoint-jsonstat.rst b/pdns/recursordist/docs/http-api/endpoint-jsonstat.rst
new file mode 100644 (file)
index 0000000..088afc1
--- /dev/null
@@ -0,0 +1,60 @@
+jsonstat endpoint
+=================
+
+.. http:get:: /jsonstat
+
+  Get statistics from recursor in JSON format.
+  The ``Accept`` request header is ignored.
+  This endpoint accepts a ``command`` and ``name`` query for different statistics:
+
+  * ``get-query-ring``: Retrieve statistics from the query subsection. ``name`` can be ``servfail-queries`` or ``queries``.
+  * ``get-remote-ring``: Retrieve statistics from the remotes subsection. ``name`` can be ``remotes``, ``bogus-remotes``, ``large-answer-remotes``, or ``timeouts``.
+
+  **Example request**:
+
+   .. sourcecode:: http
+
+      GET /jsonstat?command=get-query-ring&name=servfail-queries HTTP/1.1
+      Host: example.com
+      Accept: application/json, text/javascript
+
+  **Example request**:
+
+   .. sourcecode:: http
+
+      GET /jsonstat?command=get-query-ring&name=queries HTTP/1.1
+      Host: example.com
+      Accept: application/json, text/javascript
+
+  **Example request**:
+
+   .. sourcecode:: http
+
+      GET /jsonstat?command=get-remote-ring&name=remotes HTTP/1.1
+      Host: example.com
+      Accept: application/json, text/javascript
+
+  **Example request**:
+
+   .. sourcecode:: http
+
+      GET /jsonstat?command=get-remote-ring&name=bogus-remotes HTTP/1.1
+      Host: example.com
+      Accept: application/json, text/javascript
+
+  **Example request**:
+
+   .. sourcecode:: http
+
+      GET /jsonstat?command=get-remote-ring&name=large-answer-remotes HTTP/1.1
+      Host: example.com
+      Accept: application/json, text/javascript
+
+  **Example request**:
+
+   .. sourcecode:: http
+
+      GET /jsonstat?command=get-remote-ring&name=timeouts HTTP/1.1
+      Host: example.com
+      Accept: application/json, text/javascript
+
index 41e6f6bce1214a9a5861a14d42aeb0f6aa71b0fd..9fd799638717236d8a452f0e65595b2767500a48 100644 (file)
@@ -64,3 +64,4 @@ All API endpoints for the PowerDNS Recursor are documented here:
   endpoint-cache
   endpoint-failure
   endpoint-rpz-stats
+  endpoint-jsonstat