Skip to content
Snippets Groups Projects
Commit 9c4ed266 authored by Vladimír Čunát's avatar Vladimír Čunát
Browse files

Merge !1273: Documentation nits (policy, predict)

parents b21b33ba fb7d5e6c
1 merge request!1273Documentation nits
Pipeline #96481 passed with stages
in 6 minutes and 5 seconds
......@@ -36,12 +36,21 @@ A *filter* selects which queries will be affected by specified Actions_. There a
Applies the action if query name suffix matches one of suffixes in the table (useful for "is domain in zone" rules).
.. note:: For speed this filter requires domain names in DNS wire format, not textual representation, so each label in the name must be prefixed with its length. Always use convenience function :func:`policy.todnames` for automatic conversion from strings! For example:
.. code-block:: lua
policy.add(policy.suffix(policy.DENY, policy.todnames({'example.com', 'example.net'})))
.. note:: For speed this filter requires domain names in DNS wire format, not textual representation, so each label in the name must be prefixed with its length. Always use convenience function :func:`policy.todnames` for automatic conversion from strings! For example:
.. _IDN:
.. note:: Non-ASCII is not supported.
Knot Resolver does not provide any convenience support for IDN.
Therefore everywhere (all configuration, logs, RPZ files) you need to deal with the
`xn\-\- forms <https://en.wikipedia.org/wiki/Internationalized_domain_name#Example_of_IDNA_encoding>`_
of domain name labels, instead of directly using unicode characters.
.. function:: domains(action, domain_table)
Like :func:`policy.suffix` match, but the queried name must match exactly, not just its suffix.
......@@ -691,6 +700,8 @@ Response policy zones
log_groups({'policy'})
See also :ref:`non-ASCII support note <IDN>`.
.. function:: rpz(action, path, [watch = true])
......
......@@ -22,7 +22,7 @@ Prediction
----------
The predict module can also learn usage patterns and repetitive queries,
though this mechanism is basically a prototype.
though this mechanism is a prototype and **not recommended** for use in production or with high traffic.
For example, if it makes a query every day at 18:00,
the resolver expects that it is needed by that time and prefetches it ahead of time.
......@@ -41,13 +41,12 @@ Example configuration
modules = {
predict = {
-- this mode is NOT RECOMMENDED for use in production
window = 15, -- 15 minutes sampling window
period = 6*(60/15) -- track last 6 hours
}
}
Defaults are as above: 15 minutes window, 6 hours period.
Exported metrics
----------------
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment