Send metricbeat via logstash as datastream

Hi @A_Mightiev I don't think you looked close...

I have personally tested Metricbeat -> Logstash -> Elasticsearch Cloud 8.x (although I have not tried 8.6.1) today I can do that later...

action => "create" <!----- Not Setting this is cause of your issue

input {
  beats {
    port => 5044
  }
}

output {
  if [@metadata][pipeline] {
    elasticsearch {
      hosts => "https://061ab24010a2482e9d64729fdb0fd93a.us-east-1.aws.found.io:9243"
      manage_template => false
      index => "%{[@metadata][beat]}-%{[@metadata][version]}" 
      action => "create" <!----- Not Setting this is cause of your issue
      pipeline => "%{[@metadata][pipeline]}" 
      user => "elastic"
      password => "secret"
    }
  } else {
    elasticsearch {
      hosts => "https://061ab24010a2482e9d64729fdb0fd93a.us-east-1.aws.found.io:9243"
      manage_template => false
      index => "%{[@metadata][beat]}-%{[@metadata][version]}" 
      action => "create" <!----- Not Setting this is cause of your issue
      user => "elastic"
      password => "secret"
    }
  }
1 Like