if [type]=="wineventlog" and "DC" in [tags] {
tcp {
host => "loghost"
port => "5142"
mode => "client"
codec => "json_lines"
}
} else if [type]=="wineventlog" and "PCI" in [tags] {
tcp {
host => "loghost"
port => "5141"
mode => "client"
codec => "json_lines"
}
} else if [type]=="wineventlog" {
tcp {
host => "loghost"
port => "5140"
mode => "client"
codec => "json_lines"
}
} else if [type]=="filebeat" and "apache" in [tags] {
tcp {
host => "loghost"
port => "5145"
mode => "client"
codec => "json_lines"
}
} else if [type]=="filebeat" and "PCI" in [tags] {
tcp {
host => "loghost"
port => "5144"
mode => "client"
codec => "json_lines"
}
} else if [type]=="filebeat" {
tcp {
host => "loghost"
port => "5143"
mode => "client"
codec => "json_lines"
}
} else {
file {
path => "/opt/syslog-ng/logs/logstash/%{host}-%{+YYYY-MM-dd}.json"
codec => "json_lines"
}
}
}