47 lines
1.1 KiB
YAML
47 lines
1.1 KiB
YAML
# Fluent Bit Config
|
|
config:
|
|
inputs: |
|
|
[INPUT]
|
|
Name tail
|
|
Path /var/log/containers/*.log
|
|
multiline.parser docker, cri
|
|
Tag kube.*
|
|
Mem_Buf_Limit 5MB
|
|
Skip_Long_Lines On
|
|
|
|
filters: |
|
|
[FILTER]
|
|
Name kubernetes
|
|
Match kube.*
|
|
Merge_Log On
|
|
Keep_Log Off
|
|
K8S-Logging.Parser On
|
|
K8S-Logging.Exclude On
|
|
|
|
outputs: |
|
|
[OUTPUT]
|
|
Name loki
|
|
Match *
|
|
Host loki-gateway
|
|
Port 80
|
|
Labels job=fluent-bit,namespace=$kubernetes['namespace_name'],pod=$kubernetes['pod_name'],container=$kubernetes['container_name']
|
|
Auto_Kubernetes_Labels Off
|
|
tenant_id test
|
|
---
|
|
# Grafana Datasource Config
|
|
datasources:
|
|
datasources.yaml:
|
|
apiVersion: 1
|
|
datasources:
|
|
- name: Loki
|
|
type: loki
|
|
access: proxy
|
|
editable: true
|
|
url: http://loki-gateway.default
|
|
jsonData:
|
|
timeout: 60
|
|
maxLines: 1000
|
|
httpHeaderName1: "X-Scope-OrgID"
|
|
secureJsonData:
|
|
httpHeaderValue1: "test"
|