I need to divide Winlogbeat input and push it to two separate indices when a beat has a particular event ID.
I used an if statement but the indices seems to have the same data.
This is my pipeline configuration:
input {
beats {
port => 5045
}
}
output {
elasticsearch {
hosts => ["https://x1x:9200", "https://x2x:9200", "https://x3x:9200"]
ssl => true
ssl_certificate_verification => false
user => admin
password => admin:
ilm_enabled => false
index => "windows-%{+YYYY.MM.dd}"
}
}
if [winlog.event_id] == [4634] and [event.code] == [4635] {
elasticsearch {
hosts => ["https://x1x:9200", "https://x2x:9200", "https://x3x:9200"]
ssl => true
ssl_certificate_verification => false
user => admin
password => admin
ilm_enabled => false
index => "sharepoint-%{+YYYY.MM}"
}
}