Hi, I need to create a filter to avoid duplicating the information that I have from one index to another, in the configuration of the logstash file where the data of the first index that I upload to elastic are, I already made a filter that goes to snmp logstash, but in the other logstash file where the heartbeat data is uploaded to elastic, this in the logstash configuration is in beats, I tried to make a filter for that case but it does not work, I still get the data from the other index to that one, here I show you the index that is uploading data from snmp to the heartbeat index:
where the red circle is the snmp data that is appearing in my heartbeat data index.
input {
beats {
port => 5022
# add_field => {ping-distrital => "uptime" }
}
}
filter {
mutate {
add_field => { "Tipo" => "Ping" }
}
}
output {
if [Tipo] == "Ping" {
# stdout{ }
elasticsearch {
hosts => ["https://xxxxxxxxxxxxxxxxus-central1.gcp.cloud.es.io:9243"]
user => "elastic"
password => "xxxxxxxxxxxxxxx"
index => "agenteallot"
}
}
}
here I show you the configuration that I have of beats in logstash, where it passes me the heartbeat data through logstash and uploads them to elastic. I look forward to your help and cooperation with this, thanks you...