Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- apiVersion: v1
- kind: ConfigMap
- metadata:
- name: fluent-bit-config
- namespace: logging
- labels:
- k8s-app: fluent-bit
- data:
- # Configuration files: server, input, filters and output
- # ======================================================
- fluent-bit.conf: |
- [SERVICE]
- Flush 1
- Log_Level info
- Daemon off
- Parsers_File parsers.conf
- HTTP_Server On
- HTTP_Listen 0.0.0.0
- HTTP_Port 2020
- @INCLUDE input-kubernetes.conf
- @INCLUDE filter-kubernetes.conf
- @INCLUDE output-elasticsearch.conf
- input-kubernetes.conf: |
- [INPUT]
- Name tail
- Tag kube.*
- Path /var/log/containers/*.log
- Parser docker
- DB /var/log/flb_kube.db
- Mem_Buf_Limit 50MB
- Skip_Long_Lines On
- Refresh_Interval 10
- filter-kubernetes.conf: |
- [FILTER]
- Name kubernetes
- Match kube.*
- Merge_Log On
- Merge_Log_Key json
- Keep_Log Off
- K8S-Logging.Parser On
- K8S-Logging.Exclude On
- Labels On
- Annotations On
- output-elasticsearch.conf: |
- [OUTPUT]
- Name es
- Match *
- Host es.example.com
- Port 443
- HTTP_User elastic
- HTTP_Passwd 1234567890
- TLS On
- Logstash_Format On
- Logstash_Prefix mylogs
- Type _doc
- Replace_Dots On
- Retry_Limit False
- parsers.conf: |
- [PARSER]
- Name nginx
- Format regex
- Regex ^(?<remote>[^ ]*) (?<host>[^ ]*) (?<user>[^ ]*) \[(?<time>[^\]]*)\] "(?<method>\S+)(?: +(?<path>[^\"]*?)(?: +\S*)?)?" (?<code>[^ ]*) (?<size>[^ ]*)(?: "(?<referer>[^\"]*)" "(?<agent>[^\"]*)")?$
- Time_Key time
- Time_Format %d/%b/%Y:%H:%M:%S %z
- [PARSER]
- Name json
- Format json
- Time_Key time
- Time_Format %d/%b/%Y:%H:%M:%S %z
- [PARSER]
- Name docker
- Format json
- Time_Key time
- Time_Format %Y-%m-%dT%H:%M:%S.%L
- Time_Keep On
- [PARSER]
- Name syslog
- Format regex
- Regex ^\<(?<pri>[0-9]+)\>(?<time>[^ ]* {1,2}[^ ]* [^ ]*) (?<host>[^ ]*) (?<ident>[a-zA-Z0-9_\/\.\-]*)(?:\[(?<pid>[0-9]+)\])?(?:[^\:]*\:)? *(?<message>.*)$
- Time_Key time
- Time_Format %b %d %H:%M:%S
Add Comment
Please, Sign In to add comment