Fluentd

A configuration reference for fluentd service configuration in "Logging Operator"

Image Configuration

We can define our custom fluentd image configuration.

  image: fluent/fluentd-kubernetes-daemonset:v1-debian-elasticsearch
  imagePullPolicy: "IfNotPresent"

Elasticsearch Configuration

Elasticsearch connection details information should be defined under the elasticsearch object.

  elasticsearch:
    host: "elasticsearch-cluster-ingestion"
    username: elastic
    password: "Opstree@1234"
    tlsEnabled: true

Log Prefix

Log prefix information to append the Kubernetes meta information in the fluentd index in elasticsearch.

logPrefix: namespace # namespace or podName
# index will be created like kubernetes-<namespace>

Resources

Resources footprint can be defined under the resource object.

  resources:
    requests:
      cpu: 100m
      memory: 200Mi
    limits:
      cpu: 100m
      memory: 200Mi

Custom Configuration

Custom fluentd configuration for log parsing and aggregation.

  customConfiguration:
    kubelet.conf: |-
      <source>
        @type systemd
        @id in_systemd_kubelet
        matches [{ "_SYSTEMD_UNIT": "kubelet.service" }]
        <storage>
          @type local
          persistent true
          path /var/log/fluentd-journald-kubelet-cursor.json
        </storage>
        <entry>
          fields_strip_underscores true
        </entry>
        read_from_head true
        tag kubelet
      </source>

Last updated