/
fluent-bit.conf
58 lines (50 loc) · 1.36 KB
/
fluent-bit.conf
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
[SERVICE]
flush 5
daemon Off
log_level info
parsers_file parsers.conf
plugins_file plugins.conf
http_server Off
http_listen 0.0.0.0
http_port 2020
storage.metrics on
[INPUT]
Name syslog
Listen 0.0.0.0
Port 1514
Parser syslog-rfc3164
Mode udp
tag unifi
[FILTER]
Name lua
Match *
script /etc/fluent-bit/parse_timestamp.lua
call local_timestamp_to_UTC
[FILTER]
Name parser
Match unifi
Key_Name message
Parser iptables
Preserve_Key True
Reserve_Data True
[FILTER]
Name geoip2
Match unifi
Database /etc/fluent-bit/GeoLite2-City.mmdb
Lookup_key source_addr
Record country source_addr %{country.names.en}
Record isocode source_addr %{country.iso_code}
Record latitude source_addr %{location.latitude}
Record longitude source_addr %{location.longitude}
Record city source_addr %{city.names.en}
Record postal_code source_addr %{postal.code}
Record region_code source_addr %{subdivisions.0.iso_code}
Record region_name source_addr %{subdivisions.0.names.en}
[OUTPUT]
Name loki
Match *
Host loki.service.<MY DOMAIN>
Port 443
tls on
Labels job=fluentbit
label_keys $city, $country