diff --git a/config.yml b/config.yml index 710db088..a1751593 100644 --- a/config.yml +++ b/config.yml @@ -2,7 +2,7 @@ # of supported collectors, loggers and transformers multiplexer: collectors: - - name: dtap + - name: tap dnstap: listen-ip: 0.0.0.0 listen-port: 6000 @@ -18,10 +18,10 @@ multiplexer: mode: text routes: - - from: [ dtap ] + - from: [ tap ] transforms: [ qnamelower ] - to: [ console ] - + to: [ prom ] + ################################################ # list of supported collectors ################################################ @@ -395,7 +395,7 @@ global: # If turned on, log some applications messages trace: # debug informations - verbose: true + verbose: false # log malformed packet log-malformed: false # filename is the file to write logs to. @@ -441,4 +441,6 @@ global: # - ra: recursion available # - ad: authenticated data # - edns-csubnet: client subnet + # - pdns-tags: powerdns metadata + # - pdns-original-request-client: powerdns metadata text-format: "timestamp-rfc3339ns identity operation rcode queryip queryport family protocol length qname qtype latency" diff --git a/doc/configuration.md b/doc/configuration.md index 85cce062..4359da9d 100644 --- a/doc/configuration.md +++ b/doc/configuration.md @@ -63,14 +63,14 @@ Example: INFO: 2022/06/25 20:54:18.173239 main - version 0.0.0 INFO: 2022/06/25 20:54:18.173271 main - config loaded... INFO: 2022/06/25 20:54:18.173277 main - starting dns-collector... -INFO: 2022/06/25 20:54:18.173369 [std_out] logger stdout - enabled +INFO: 2022/06/25 20:54:18.173369 [console] logger stdout - enabled INFO: 2022/06/25 20:54:18.173542 [dtap] dnstap collector - enabled INFO: 2022/06/25 20:54:18.173636 [pdns] pdns collector - enabled INFO: 2022/06/25 20:54:18.173914 main - running all collectors and loggers... INFO: 2022/06/25 20:54:18.173936 [pdns] pdns collector - starting collector... INFO: 2022/06/25 20:54:18.173978 [pdns] pdns collector - running in background... INFO: 2022/06/25 20:54:18.174196 [pdns] pdns collector - is listening on [::]:6001 -INFO: 2022/06/25 20:54:18.174235 [std_out] logger to stdout - running in background... +INFO: 2022/06/25 20:54:18.174235 [console] logger to stdout - running in background... INFO: 2022/06/25 20:54:18.174244 [dtap] dnstap collector - starting collector... INFO: 2022/06/25 20:54:18.174256 [dtap] dnstap collector - running in background... INFO: 2022/06/25 20:54:18.174286 [dtap] dnstap collector - is listening on [::]:6000 @@ -118,6 +118,8 @@ All available directives: - `ra`: flag recursion available - `ad`: flag authenticated data - `edns-csubnet`: display client subnet info +- `pdns-tags`: powerdns metadata, tags +- `pdns-original-request-subnet`: powerdns metadata, original request subnet ```yaml global: @@ -297,7 +299,7 @@ lua-config-file=/etc/pdns-recursor/recursor.lua */etc/pdns-recursor/recursor.lua* ```lua -protobufServer(":6001") +protobufServer(":6001", {exportTypes={pdns.A, pdns.AAAA, pdns.CNAME}}) outgoingProtobufServer(":6001") ``` diff --git a/doc/dnsjson.md b/doc/dnsjson.md index b3272b72..ad955083 100644 --- a/doc/dnsjson.md +++ b/doc/dnsjson.md @@ -10,7 +10,7 @@ Main part of a JSON message: - `dns`: dns fields - `edns`: extended dns options - `geo`: contains country, continent and city informations -- `pdns`: contains powerdns protobuf tags +- `pdns`: contains specific powerdns metadata (tags, original-request-subnet) Example: @@ -84,7 +84,8 @@ Example: "country-isocode": "-" }, "pdns": { - "tags": [] + "tags": [], + "original-request-subnet": "" } } ``` diff --git a/example-config/use-case-3.yml b/example-config/use-case-3.yml index 9980cd80..9b7ef5e6 100644 --- a/example-config/use-case-3.yml +++ b/example-config/use-case-3.yml @@ -10,13 +10,13 @@ multiplexer: listen-port: 6000 loggers: - - name: std_out + - name: console stdout: mode: json routes: - from: [tap_in] - to: [std_out] + to: [console] subprocessors: filtering: diff --git a/example-config/use-case-4.yml b/example-config/use-case-4.yml index f9d39f45..777a6299 100644 --- a/example-config/use-case-4.yml +++ b/example-config/use-case-4.yml @@ -10,7 +10,7 @@ multiplexer: listen-port: 6000 loggers: - - name: std_out + - name: console stdout: mode: text @@ -22,4 +22,4 @@ multiplexer: routes: - from: [tap_in] - to: [std_out, loki_out] \ No newline at end of file + to: [console, loki_out] \ No newline at end of file diff --git a/example-config/use-case-6.yml b/example-config/use-case-6.yml index 5917e5e1..2566d079 100644 --- a/example-config/use-case-6.yml +++ b/example-config/use-case-6.yml @@ -16,11 +16,11 @@ multiplexer: minimaze-qname: true loggers: - - name: std_out + - name: console stdout: mode: text routes: - from: [tap_in] transforms: [privacy] - to: [std_out] \ No newline at end of file + to: [console] \ No newline at end of file