-
-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
163 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
|
||
# DNS-collector with Fluentd | ||
|
||
- Copy this [folder](./docs/_integration/fluentd) | ||
|
||
- Create the `data` folder. | ||
|
||
- Start the docker stack: | ||
|
||
```bash | ||
sudo docker compose up -d | ||
|
||
sudo docker compose logs | ||
... | ||
fluentd | 2024-03-06 05:46:12.930048059 +0000 fluent.info: {"port":24224,"bind":"0.0.0.0","message":"[input1] listening port port=24224 bind=\"0.0.0.0\""} | ||
fluentd | 2024-03-06 05:46:12 +0000 [warn]: #0 no patterns matched tag="fluent.info" | ||
fluentd | 2024-03-06 05:46:12.933055666 +0000 fluent.info: {"worker":0,"message":"fluentd worker is now running worker=0"} | ||
``` | ||
|
||
- Finally, run DNScollector from source and generate some DNS logs from your DNS server with DNStap protocol. | ||
|
||
```bash | ||
go run . -config docs/_integration/fluentd/config.yml | ||
``` | ||
|
||
- Logs are available in ./data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
version: "3.8" | ||
|
||
services: | ||
fluentd: | ||
container_name: fluentd | ||
image: fluent/fluentd:v1.16-debian-2 | ||
user: 1000:1000 | ||
volumes: | ||
- ./data:/fluentd/log | ||
ports: | ||
- "24224:24224/tcp" | ||
- "24224:24224/udp" | ||
restart: unless-stopped |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters