Skip to content

Commit

Permalink
Update examples
Browse files Browse the repository at this point in the history
  • Loading branch information
dmachard committed May 30, 2024
1 parent 62df5ef commit 29b22a8
Show file tree
Hide file tree
Showing 17 changed files with 273 additions and 210 deletions.
3 changes: 0 additions & 3 deletions config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@ pipelines:
- name: console
stdout:
mode: text
routing-policy:
forward: []
dropped: []

################################################
# DEPRECATED - multiplexer configuration
Expand Down
25 changes: 25 additions & 0 deletions docs/_integration/elasticsearch/config.deprecated.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

global:
trace:
verbose: true

multiplexer:
collectors:
- name: tap
dnstap:
listen-ip: 0.0.0.0
listen-port: 6000
chan-buffer-size: 4096
loggers:
- name: elastic
elasticsearch:
server: "http://192.168.1.220:9200/"
index: "dnscollector"
chan-buffer-size: 4096
bulk-size: 5242880
flush-interval: 10
compression: gzip
bulk-channel-size: 10
routes:
- from: [ tap ]
to: [ elastic ]
39 changes: 19 additions & 20 deletions docs/_integration/elasticsearch/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,22 @@ global:
trace:
verbose: true

multiplexer:
collectors:
- name: tap
dnstap:
listen-ip: 0.0.0.0
listen-port: 6000
chan-buffer-size: 4096
loggers:
- name: elastic
elasticsearch:
server: "http://192.168.1.220:9200/"
index: "dnscollector"
chan-buffer-size: 4096
bulk-size: 5242880
flush-interval: 10
compression: gzip
bulk-channel-size: 10
routes:
- from: [ tap ]
to: [ elastic ]
pipelines:
- name: tap
dnstap:
listen-ip: 0.0.0.0
listen-port: 6000
chan-buffer-size: 4096
routing-policy:
forward: [ elastic]
dropped: []

- name: elastic
elasticsearch:
server: "http://192.168.1.220:9200/"
index: "dnscollector"
chan-buffer-size: 4096
bulk-size: 5242880
flush-interval: 10
compression: gzip
bulk-channel-size: 10
33 changes: 33 additions & 0 deletions docs/_integration/fluentd/config.deprecated.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@

global:
trace:
verbose: true

multiplexer:
collectors:
- name: tap
dnstap:
listen-ip: 0.0.0.0
listen-port: 6000
chan-buffer-size: 4096
loggers:
- name: fluentd
fluentd:
transport: tcp
remote-address: 127.0.0.1
remote-port: 24224
connect-timeout: 5
retry-interval: 10
flush-interval: 30
tag: "dns.collector"
tls-insecure: false
tls-min-version: 1.2
ca-file: ""
cert-file: ""
key-file: ""
buffer-size: 100
chan-buffer-size: 4096

routes:
- from: [ tap ]
to: [ fluentd ]
52 changes: 25 additions & 27 deletions docs/_integration/fluentd/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,29 @@ global:
trace:
verbose: true

multiplexer:
collectors:
- name: tap
dnstap:
listen-ip: 0.0.0.0
listen-port: 6000
chan-buffer-size: 4096
loggers:
- name: fluentd
fluentd:
transport: tcp
remote-address: 127.0.0.1
remote-port: 24224
connect-timeout: 5
retry-interval: 10
flush-interval: 30
tag: "dns.collector"
tls-insecure: false
tls-min-version: 1.2
ca-file: ""
cert-file: ""
key-file: ""
buffer-size: 100
chan-buffer-size: 4096
pipelines:
- name: tap
dnstap:
listen-ip: 0.0.0.0
listen-port: 6000
chan-buffer-size: 4096
routing-policy:
forward: [ fluentd ]
dropped: []

routes:
- from: [ tap ]
to: [ fluentd ]
- name: fluentd
fluentd:
transport: tcp
remote-address: 127.0.0.1
remote-port: 24224
connect-timeout: 5
retry-interval: 10
flush-interval: 30
tag: "dns.collector"
tls-insecure: false
tls-min-version: 1.2
ca-file: ""
cert-file: ""
key-file: ""
buffer-size: 100
chan-buffer-size: 4096
36 changes: 36 additions & 0 deletions docs/_integration/kafka/config.deprecated.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@

global:
trace:
verbose: true

multiplexer:
collectors:
- name: tap
dnstap:
listen-ip: 0.0.0.0
listen-port: 6000
chan-buffer-size: 4096
loggers:
- name: kafka
kafkaproducer:
remote-address: 127.0.0.1
remote-port: 9092
connect-timeout: 5
retry-interval: 10
flush-interval: 30
tls-support: false
tls-insecure: false
sasl-support: false
sasl-mechanism: PLAIN
sasl-username: false
sasl-password: false
mode: flat-json
buffer-size: 100
topic: "dnscollector"
partition: 0
chan-buffer-size: 4096
compression: none

routes:
- from: [ tap ]
to: [ kafka ]
58 changes: 28 additions & 30 deletions docs/_integration/kafka/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,34 +3,32 @@ global:
trace:
verbose: true

multiplexer:
collectors:
- name: tap
dnstap:
listen-ip: 0.0.0.0
listen-port: 6000
chan-buffer-size: 4096
loggers:
- name: kafka
kafkaproducer:
remote-address: 127.0.0.1
remote-port: 9092
connect-timeout: 5
retry-interval: 10
flush-interval: 30
tls-support: false
tls-insecure: false
sasl-support: false
sasl-mechanism: PLAIN
sasl-username: false
sasl-password: false
mode: flat-json
buffer-size: 100
topic: "dnscollector"
partition: 0
chan-buffer-size: 4096
compression: none
pipelines:
- name: tap
dnstap:
listen-ip: 0.0.0.0
listen-port: 6000
chan-buffer-size: 4096
routing-policy:
forward: [ kafka ]
dropped: []

routes:
- from: [ tap ]
to: [ kafka ]
- name: kafka
kafkaproducer:
remote-address: 127.0.0.1
remote-port: 9092
connect-timeout: 5
retry-interval: 10
flush-interval: 30
tls-support: false
tls-insecure: false
sasl-support: false
sasl-mechanism: PLAIN
sasl-username: false
sasl-password: false
mode: flat-json
buffer-size: 100
topic: "dnscollector"
partition: 0
chan-buffer-size: 4096
compression: none
3 changes: 3 additions & 0 deletions docs/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@

You will find below some examples of configurations to manage your DNS logs.

- Pipelines running mode
- [x] [Advanced example with DNSmessage collector](./_examples/use-case-24.yml)

- Capture DNS traffic from incoming DNSTap streams
- [x] [Read from UNIX DNSTap socket and forward it to TLS stream](./_examples/use-case-5.yml)
- [x] [Transform DNSTap as input to JSON format as output](./_examples/use-case-3.yml)
Expand Down
33 changes: 15 additions & 18 deletions tests/testsdata/config_bench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,19 @@ global:
trace:
verbose: true

multiplexer:
collectors:
- name: tap
dnstap:
listen-ip: 0.0.0.0
listen-port: 6000
pipelines:
- name: tap
dnstap:
listen-ip: 0.0.0.0
listen-port: 6000
routing-policy:
forward: [ web ]
dropped: []

loggers:
- name: web
webserver:
listen-ip: 0.0.0.0
listen-port: 8080
top-max-items: 100
basic-auth-login: admin
basic-auth-pwd: changeme

routes:
- from: [tap]
to: [web]
- name: web
webserver:
listen-ip: 0.0.0.0
listen-port: 8080
top-max-items: 100
basic-auth-login: admin
basic-auth-pwd: changeme
38 changes: 18 additions & 20 deletions tests/testsdata/config_metrics_dnstaptcp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,23 @@ global:
trace:
verbose: true

multiplexer:
collectors:
- name: tap
dnstap:
listen-ip: 0.0.0.0
listen-port: 6000
pipelines:
- name: tap
dnstap:
listen-ip: 0.0.0.0
listen-port: 6000
routing-policy:
forward: [ console, api ]
dropped: []

loggers:
- name: console
stdout:
mode: text
- name: api
restapi:
listen-ip: 0.0.0.0
listen-port: 8080
top-n: 100
basic-auth-login: admin
basic-auth-pwd: changeme
- name: console
stdout:
mode: text

routes:
- from: [tap]
to: [console, api]
- name: api
restapi:
listen-ip: 0.0.0.0
listen-port: 8080
top-n: 100
basic-auth-login: admin
basic-auth-pwd: changeme
Loading

0 comments on commit 29b22a8

Please sign in to comment.