Guest User

fluent-bit-config.yaml

a guest
Jul 7th, 2020
32
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 2.56 KB | None | 0 0
  1. apiVersion: v1
  2. kind: ConfigMap
  3. metadata:
  4.   name: fluent-bit-config
  5.   namespace: logging
  6.   labels:
  7.     k8s-app: fluent-bit
  8. data:
  9.  # Configuration files: server, input, filters and output
  10.   # ======================================================
  11.   fluent-bit.conf: |
  12.    [SERVICE]
  13.         Flush         1
  14.         Log_Level     info
  15.         Daemon        off
  16.         Parsers_File  parsers.conf
  17.         HTTP_Server   On
  18.         HTTP_Listen   0.0.0.0
  19.         HTTP_Port     2020
  20.     @INCLUDE input-kubernetes.conf
  21.     @INCLUDE filter-kubernetes.conf
  22.     @INCLUDE output-elasticsearch.conf
  23.   input-kubernetes.conf: |
  24.    [INPUT]
  25.         Name              tail
  26.         Tag               kube.*
  27.         Path              /var/log/containers/*.log
  28.         Parser            docker
  29.         DB                /var/log/flb_kube.db
  30.         Mem_Buf_Limit     50MB
  31.         Skip_Long_Lines   On
  32.         Refresh_Interval  10
  33.   filter-kubernetes.conf: |
  34.    [FILTER]
  35.         Name                kubernetes
  36.         Match               kube.*
  37.         Merge_Log           On
  38.         Merge_Log_Key       json
  39.         Keep_Log            Off
  40.         K8S-Logging.Parser  On
  41.         K8S-Logging.Exclude On
  42.         Labels              On
  43.         Annotations         On
  44.   output-elasticsearch.conf: |
  45.    [OUTPUT]
  46.         Name            es
  47.         Match           *
  48.         Host            es.example.com
  49.         Port            443
  50.         HTTP_User       elastic
  51.         HTTP_Passwd     1234567890
  52.         TLS             On
  53.         Logstash_Format On
  54.         Logstash_Prefix mylogs
  55.         Type  _doc
  56.         Replace_Dots    On
  57.         Retry_Limit     False
  58.   parsers.conf: |
  59.    [PARSER]
  60.         Name   nginx
  61.         Format regex
  62.         Regex ^(?<remote>[^ ]*) (?<host>[^ ]*) (?<user>[^ ]*) \[(?<time>[^\]]*)\] "(?<method>\S+)(?: +(?<path>[^\"]*?)(?: +\S*)?)?" (?<code>[^ ]*) (?<size>[^ ]*)(?: "(?<referer>[^\"]*)" "(?<agent>[^\"]*)")?$
  63.         Time_Key time
  64.         Time_Format %d/%b/%Y:%H:%M:%S %z
  65.     [PARSER]
  66.         Name   json
  67.         Format json
  68.         Time_Key time
  69.         Time_Format %d/%b/%Y:%H:%M:%S %z
  70.     [PARSER]
  71.         Name        docker
  72.         Format      json
  73.         Time_Key    time
  74.         Time_Format %Y-%m-%dT%H:%M:%S.%L
  75.         Time_Keep   On
  76.     [PARSER]
  77.         Name        syslog
  78.         Format      regex
  79.         Regex       ^\<(?<pri>[0-9]+)\>(?<time>[^ ]* {1,2}[^ ]* [^ ]*) (?<host>[^ ]*) (?<ident>[a-zA-Z0-9_\/\.\-]*)(?:\[(?<pid>[0-9]+)\])?(?:[^\:]*\:)? *(?<message>.*)$
  80.         Time_Key    time
  81.         Time_Format %b %d %H:%M:%S
Add Comment
Please, Sign In to add comment