---
apiVersion: v1
kind: ConfigMap
metadata:
  name: logstash-indexer
data:
  10-input-beat: |-
    input {
    beats {
      port => 5044
     }
    }

  20-kubernetes-filter: |-
    filter {
    if "log" == [input_type] {
    mutate {
     rename => ["source", "path"]
    }
    kubernetes {
     add_tag => ["kubernetes_filtered"]
    }
    mutate {
     rename => ["path", "log_source"]
    }
    json {
     source => 'message'
     target => 'log'
      }
     }
    }

  100-output-elasticsearch: |-
    output {
      elasticsearch {
        hosts => [{{elasticsearch_hosts}}]
        }
    }
