categraf/logs
kongfei605 dcce8640af
keep hostname of logs consistent with metrics (#10)
* keep hostname of logs consistent with metrics

* update description of bug report template (#2)
2022-06-10 08:47:04 +08:00
..
auditor reorganize log pkg 2022-06-02 19:55:13 +08:00
client reorganize pkg/util 2022-06-02 21:13:30 +08:00
decoder reorganize log pkg 2022-06-02 19:55:13 +08:00
diagnostic keep hostname of logs consistent with metrics (#10) 2022-06-10 08:47:04 +08:00
input update Makefile & fix tailer_windows 2022-06-04 22:11:40 +08:00
message keep hostname of logs consistent with metrics (#10) 2022-06-10 08:47:04 +08:00
parser reorganize log pkg 2022-06-02 19:55:13 +08:00
pb keep hostname of logs consistent with metrics (#10) 2022-06-10 08:47:04 +08:00
pipeline reorganize log pkg 2022-06-02 19:55:13 +08:00
processor keep hostname of logs consistent with metrics (#10) 2022-06-10 08:47:04 +08:00
restart reorganize log pkg 2022-06-02 19:55:13 +08:00
sender reorganize log pkg 2022-06-02 19:55:13 +08:00
service reorganize log pkg 2022-06-02 19:55:13 +08:00
status reorganize log pkg 2022-06-02 19:55:13 +08:00
tag reorganize log pkg 2022-06-02 19:55:13 +08:00
README.md reorganize log pkg 2022-06-02 19:55:13 +08:00

README.md

logs-agent

logs-agent collects logs and submits them to datadog's infrastructure.

Structure

logs reads the config files, and instantiates what's needed. Each log line comes from a source (e.g. file, network, docker), and then enters one of the available pipeline - tailer|listener|container -> decoder -> processor -> sender -> auditor

Tailer tails a file and submits data to the processors

Listener listens on local network (TCP, UDP, Unix) and submits data to the processors

Container scans docker logs from stdout/stderr and submits data to the processors

Decoder converts bytes arrays into messages

Processor updates the messages, filtering, redacting or adding metadata, and submits to the forwarder

Sender submits the messages to the intake, and notifies the auditor

Auditor notes that messages were properly submitted, stores offsets for agent restarts

Tests

# Run the unit tests
inv test --targets=./pkg/logs --timeout=10