From 0fb7654eeb75e0b01f27b04c258c7c61ce661429 Mon Sep 17 00:00:00 2001 From: Charles-Henri Bruyand Date: Tue, 8 May 2018 12:43:53 +0200 Subject: [PATCH] docs: document setVerboseHealthChecks() --- pdns/dnsdistdist/docs/guides/downstreams.rst | 2 ++ pdns/dnsdistdist/docs/guides/webserver.rst | 2 +- pdns/dnsdistdist/docs/reference/config.rst | 6 ++++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/pdns/dnsdistdist/docs/guides/downstreams.rst b/pdns/dnsdistdist/docs/guides/downstreams.rst index 2c2b50af4..e72e09a20 100644 --- a/pdns/dnsdistdist/docs/guides/downstreams.rst +++ b/pdns/dnsdistdist/docs/guides/downstreams.rst @@ -39,6 +39,8 @@ e.g.:: newServer({address="192.0.2.1", checkType="AAAA", checkType=DNSClass.CHAOS, checkName="a.root-servers.net.", mustResolve=true}) +You can turn on logging of health check errors using the :func:`setVerboseHealthChecks` function. + Since the 1.3.0 release, the ``checkFunction`` option is also supported, taking a ``Lua`` function as parameter. This function receives a DNSName, two integers and a ``DNSHeader`` object (:ref:`DNSHeader`) representing the QName, QType and QClass of the health check query as well as the DNS header, as they are defined before the function was called. The function must return a DNSName and two integers representing the new QName, QType and QClass, and can directly modify the ``DNSHeader`` object. diff --git a/pdns/dnsdistdist/docs/guides/webserver.rst b/pdns/dnsdistdist/docs/guides/webserver.rst index 9bfc57216..367347a6e 100644 --- a/pdns/dnsdistdist/docs/guides/webserver.rst +++ b/pdns/dnsdistdist/docs/guides/webserver.rst @@ -149,7 +149,7 @@ JSON Objects - ``tcp-send-timeout`` - ``truncate-tc`` - ``verbose`` - - ``verbose-health-checks`` + - ``verbose-health-checks`` The currently configured :func:`setVerboseHealthChecks` :property string name: The name of the setting :property string type: "ConfigSetting" diff --git a/pdns/dnsdistdist/docs/reference/config.rst b/pdns/dnsdistdist/docs/reference/config.rst index 878fca371..55a816911 100644 --- a/pdns/dnsdistdist/docs/reference/config.rst +++ b/pdns/dnsdistdist/docs/reference/config.rst @@ -626,6 +626,12 @@ Status, Statistics and More :param {str} selectors: A lua table of selectors. Only queries matching all selectors are shown :param int num: Show a maximum of ``num`` recent queries, default is 10. +.. function:: setVerboseHealthChecks(verbose) + + Set whether health check errors should be logged. This is turned off by default. + + :param bool verbose: Set to true if you want to enable health check errors logging + .. function:: showBinds() Print a list of all the current addresses and ports dnsdist is listening on, also called ``frontends`` -- 2.40.0