input{
  kafka {
    bootstrap_servers => ["kafka:29092"]
    client_id => "agent-builder-trace"
    topics => ["agent-builder-trace"]
    group_id => "agent-builder-trace_dme_id"
    consumer_threads => 1
    codec => json
    add_field => { "dme-topic" => "agent-builder-trace" }
  }
  kafka {
    bootstrap_servers => ["kafka:29092"]
    client_id => "spark-agent-builder"
    topics => ["spark-agent-builder"]
    group_id => "spark-agent-builder_dme_id"
    consumer_threads => 1
    codec => json
    add_field => { "dme-topic" => "spark-agent-builder" }
  }
}
filter{
  if [dme-topic] in ["agent-builder-trace","spark-agent-builder"] {
    mutate {
      remove_field => ["tags"]
    }
  }
}
output{
  if [dme-topic] in ["agent-builder-trace","spark-agent-builder"] {
    elasticsearch {
      hosts => ["http://elasticsearch:9200"]
      index => "spark-agent-builder-%{+YYYY.MM}"
    }
  }
}
