-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathfluent-bit.yaml
More file actions
74 lines (65 loc) · 1.72 KB
/
Copy pathfluent-bit.yaml
File metadata and controls
74 lines (65 loc) · 1.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# Fluent Bit pipeline: tail watcher OSPF logs -> grep -> lua parse -> modify -> http/stdout
# Replaces fluent-bit.conf (classic format). Lua script kept for CSV parsing logic.
service:
flush: 1
log_level: info
daemon: off
parsers_file: parsers.conf
http_server: on
http_listen: 0.0.0.0
http_port: 2020
pipeline:
inputs:
- name: tail
tag: watcher_logs
path: /home/watcher/watcher/logs/watcher*.ospf.log
read_from_head: false
refresh_interval: 1
rotate_wait: 1
mem_buf_limit: 50MB
skip_long_lines: on
filters:
- name: grep
match: watcher_logs
regex: log changed
- name: lua
match: watcher_logs
script: /fluent-bit/etc/parse_events.lua
call: parse_events
- name: modify
match: watcher_logs
add:
- protocol ospf
- metadata.exporter fluentbit
outputs:
- name: http
match: watcher_logs
host: ${TOPOLOGRAPH_HOST}
port: ${TOPOLOGRAPH_PORT}
uri: /websocket
format: json
json_date_key: "@timestamp"
retry_limit: 3
tls: off
- name: http
match: watcher_logs
host: ${WEBHOOK_HOST}
port: ${WEBHOOK_PORT}
uri: ${WEBHOOK_URI}
format: json
json_date_key: false
retry_limit: 3
tls: ${WEBHOOK_TLS_ON}
# Loki output: set LOKI_HOST/LOKI_PORT to enable (defaults point to a local Loki)
- name: loki
match: watcher_logs
host: ${LOKI_HOST}
port: ${LOKI_PORT}
labels: job=topolograph-ospf
label_keys: $event_name,$event_status,$area_num,$asn,$watcher_name
line_format: json
auto_kubernetes_labels: off
retry_limit: 3
- name: stdout
match: watcher_logs
format: json