]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
rec: Add RPZ statistics docs 6379/head
authorPieter Lexis <pieter.lexis@powerdns.com>
Fri, 23 Mar 2018 11:25:24 +0000 (12:25 +0100)
committerPieter Lexis <pieter.lexis@powerdns.com>
Fri, 23 Mar 2018 11:25:24 +0000 (12:25 +0100)
pdns/recursordist/docs/http-api/endpoint-rpz-stats.rst [new file with mode: 0644]
pdns/recursordist/docs/http-api/index.rst

diff --git a/pdns/recursordist/docs/http-api/endpoint-rpz-stats.rst b/pdns/recursordist/docs/http-api/endpoint-rpz-stats.rst
new file mode 100644 (file)
index 0000000..1e1924e
--- /dev/null
@@ -0,0 +1,34 @@
+RPZ Statistics endpoint
+=======================
+
+.. versionadded:: 4.1.2
+
+.. http:get:: /api/v1/servers/:server_id/rpzstatistics
+
+  Query PowerDNS for :doc:`Response Policy Zones <../lua-config/rpz>` statistics.
+
+  Statistics are mapped per configured RPZ zone.
+  The statistics are:
+
+  :last_update: UNIX timestamp when the latest update was received
+  :records: Number of records in the RPZ
+  :serial: Current SOA serial of the RPZ zone
+  :transfers_failed: Number of times a transfer failed
+  :transfers_full: Number of times an AXFR succeeded
+  :transfers_success: Number of times an AXFR or IXFR succeeded
+
+  **Example response:**
+
+  .. code-block:: json
+
+  {
+    "myRPZ": {
+      "last_update": 1521798212,
+      "records": 1343149,
+      "serial": 5489,
+      "transfers_failed": 0,
+      "transfers_full": 3,
+      "transfers_success": 478
+    }
+  }
+
index 1e2d7729047b229baf96e8488ab504f8718b65ad..d63eced8c1c4d878d69e338686f18f9a5ed011f4 100644 (file)
@@ -64,3 +64,4 @@ All API endpoints for the PowerDNS Recursor are documented here:
   endpoint-cache
   ../common/api/endpoint-logging.rst
   endpoint-failure
+  endpoint-rpz-stats