apiVersion: v1
kind: ConfigMap
metadata:
  name: filebeat-config
  namespace: starcoin-barnard
  labels:
    k8s-app: filebeat
    kubernetes.io/cluster-service: "true"
    app: filebeat-config
data:
  filebeat.yml: |-
    filebeat.inputs:
    - type: log
      paths:
        - /sc-data/main/sc_slog.log

    processors:
      - drop_fields:
          fields: ["host", "log", "prospector", "input", "beat", "offset"]
          ignore_missing: true

    output.elasticsearch:
      hosts: ['https://${ELASTICSEARCH_HOST:elasticsearch}:${ELASTICSEARCH_PORT:443}']
      username: ${ELASTICSEARCH_USERNAME}
      password: ${ELASTICSEARCH_PASSWORD}
      pipeline: log_split
      index: "filebeat-%{[agent.version]}-%{+yyyy.MM.dd}"
      manage_template: false
    setup.ilm.enabled: false
    setup.template.name: "filebeat-%{[agent.version]}"
    setup.template.pattern: "filebeat-%{[agent.version]}-*"
