-
Notifications
You must be signed in to change notification settings - Fork 0
/
fluent-bit-configmap-akash-services-k3s.yaml
159 lines (142 loc) · 4.59 KB
/
fluent-bit-configmap-akash-services-k3s.yaml
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
apiVersion: v1
kind: ConfigMap
metadata:
name: fluent-bit-config
namespace: monitoring
data:
fluent-bit.conf: |
[SERVICE]
Flush 1
Daemon off
Log_Level info
Parsers_File parsers.conf
# Common Kubernetes Filter for Container Logs
[FILTER]
Name kubernetes
Match kube.var.log.containers.*
Merge_Log on
Keep_Log off
K8S-Logging.Parser on
K8S-Logging.Exclude off
# akash-provider
[INPUT]
Name tail
Tag kube.var.log.containers.akash-provider*
Path /var/log/containers/akash-provider-*.log
Parser docker
Refresh_Interval 10
Mem_Buf_Limit 5MB
Skip_Long_Lines on
[FILTER]
Name modify
Match kube.var.log.containers.akash-provider*
Add cluster_name <CLUSTER_NAME>
Add container_name akash-provider-0
[OUTPUT]
Name loki
Match kube.var.log.containers.akash-provider*
Host <host>
Port 32100
Labels cluster_name=<CLUSTER_NAME>,container_name=akash-provider-0
Label_Keys $cluster_name,$container_name
Line_Format json
Auto_Kubernetes_Labels false
# operator-hostname
[INPUT]
Name tail
Tag kube.var.log.containers.operator-hostname*
Path /var/log/containers/operator-hostname-*.log
Parser docker
Refresh_Interval 10
Mem_Buf_Limit 5MB
Skip_Long_Lines on
[FILTER]
Name modify
Match kube.var.log.containers.operator-hostname*
Add cluster_name <CLUSTER_NAME>
Add container_name operator-hostname
[OUTPUT]
Name loki
Match kube.var.log.containers.operator-hostname*
Host <host>
Port 32100
Labels cluster_name=<CLUSTER_NAME>,container_name=operator-hostname
Label_Keys $cluster_name,$container_name
Line_Format json
Auto_Kubernetes_Labels false
# operator-inventory
[INPUT]
Name tail
Tag kube.var.log.containers.operator-inventory*
Path /var/log/containers/operator-inventory-*.log
Parser docker
Refresh_Interval 10
Mem_Buf_Limit 5MB
Skip_Long_Lines on
[FILTER]
Name modify
Match kube.var.log.containers.operator-inventory*
Add cluster_name <CLUSTER_NAME>
Add container_name operator-inventory
[OUTPUT]
Name loki
Match kube.var.log.containers.operator-inventory*
Host <host>
Port 32100
Labels cluster_name=<CLUSTER_NAME>,container_name=operator-inventory
Label_Keys $cluster_name,$container_name
Line_Format json
Auto_Kubernetes_Labels false
# operator-inventory-hardware-discovery
[INPUT]
Name tail
Tag kube.var.log.containers.operator-inventory-hardware*
Path /var/log/containers/operator-inventory-hardware-discovery-*.log
Parser docker
Refresh_Interval 10
Mem_Buf_Limit 5MB
Skip_Long_Lines on
[FILTER]
Name modify
Match kube.var.log.containers.operator-inventory-hardware*
Add cluster_name <CLUSTER_NAME>
Add container_name operator-inventory-hardware-discovery
[OUTPUT]
Name loki
Match kube.var.log.containers.operator-inventory-hardware*
Host <host>
Port 32100
Labels cluster_name=<CLUSTER_NAME>,container_name=operator-inventory-hardware-discovery
Label_Keys $cluster_name,$container_name
Line_Format json
Auto_Kubernetes_Labels false
# Kubernetes Events Input
[INPUT]
Name kubernetes_events
Tag kube.var.log.kubernetes.events
Interval_Sec 1
Kube_URL https://kubernetes.default.svc:443
Kube_CA_File /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
Kube_Token_File /var/run/secrets/kubernetes.io/serviceaccount/token
Kube_Token_TTL 600
[FILTER]
Name modify
Match kube.var.log.kubernetes.events
Add cluster_name <CLUSTER_NAME>
Add log_type kubernetes_events
[OUTPUT]
Name loki
Match kube.var.log.kubernetes.events
Host <host>
Port 32100
Labels cluster_name=<CLUSTER_NAME>,log_type=kubernetes_events
Label_Keys $cluster_name,$log_type
Line_Format json
Auto_Kubernetes_Labels false
parsers.conf: |
[PARSER]
Name docker
Format json
Time_Key time
Time_Format %Y-%m-%dT%H:%M:%S.%L
Time_Keep On