From 4fe8a79ffcc2e3eec7b5e30f43adf0e2d71ccc1e Mon Sep 17 00:00:00 2001 From: Pieter Lexis Date: Fri, 23 Mar 2018 12:25:24 +0100 Subject: [PATCH] rec: Add RPZ statistics docs --- .../docs/http-api/endpoint-rpz-stats.rst | 34 +++++++++++++++++++ pdns/recursordist/docs/http-api/index.rst | 1 + 2 files changed, 35 insertions(+) create mode 100644 pdns/recursordist/docs/http-api/endpoint-rpz-stats.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 index 000000000..1e1924e6a --- /dev/null +++ b/pdns/recursordist/docs/http-api/endpoint-rpz-stats.rst @@ -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 + } + } + diff --git a/pdns/recursordist/docs/http-api/index.rst b/pdns/recursordist/docs/http-api/index.rst index 1e2d77290..d63eced8c 100644 --- a/pdns/recursordist/docs/http-api/index.rst +++ b/pdns/recursordist/docs/http-api/index.rst @@ -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 -- 2.50.1