Identity and version support for the dnstap plugin (#5555)

* Added identity and version support to dnstap plugin

Signed-off-by: Daniel Jolly <code@danieljolly.com>

* Added missing commas

Signed-off-by: Daniel Jolly <code@danieljolly.com>

* Moved byte slice conversions to setup rather than handler.
Fixed indentation issue.

Signed-off-by: Daniel Jolly <code@danieljolly.com>

* Improved setup config parsing and added tests to detect various configurations

Signed-off-by: Daniel Jolly <code@danieljolly.com>

Signed-off-by: Daniel Jolly <code@danieljolly.com>
Co-authored-by: Daniel Jolly <code@danieljolly.com>
This commit is contained in:
Daniel Jolly
2022-09-07 09:22:38 -04:00
committed by GitHub
parent a740ed7536
commit 0511ca2e4d
4 changed files with 67 additions and 10 deletions

View File

@@ -15,11 +15,16 @@ Every message is sent to the socket as soon as it comes in, the *dnstap* plugin
## Syntax
~~~ txt
dnstap SOCKET [full]
dnstap SOCKET [full] {
[identity IDENTITY]
[version VERSION]
}
~~~
* **SOCKET** is the socket (path) supplied to the dnstap command line tool.
* `full` to include the wire-format DNS message.
* **IDENTITY** to override the identity of the server. Defaults to the hostname.
* **VERSION** to override the version field. Defaults to the CoreDNS version.
## Examples
@@ -47,6 +52,15 @@ Log to a remote endpoint by FQDN.
dnstap tcp://example.com:6000 full
~~~
Log to a socket, overriding the default identity and version.
~~~ txt
dnstap /tmp/dnstap.sock {
identity my-dns-server1
version MyDNSServer-1.2.3
}
~~~
## Command Line Tool
Dnstap has a command line tool that can be used to inspect the logging. The tool can be found