Hi everyone,
we have 2 conf file in Logstash (version 6.8.6) conf.d directory to differentiate Microsoft log from Linux log, the first:
input {
tcp {
port => 3515
codec => json
}
}
filter {
mutate {
add_tag => ["forwardedevtx"]
}
}
output
{
elasticsearch {
hosts => [ "nodeX:9200", "nodeX:9200", "nodeX:9200" ]
index => "forwardedevtx-%{+YYYY.MM.dd}"
}
}
the second:
input {
tcp {
port => 5000
type => syslog
}
}
filter {
if [type] == "syslog" {
grok {
match => { "message" => "%{SYSLOGTIMESTAMP:syslog_timestamp} %{SYSLOGHOST:syslog_hostname} %{DATA:syslog_program}(?:\[%{POSINT:syslog_pid}\])?: %{GREEDYDATA:syslog_message}" }
add_field => [ "received_at", "%{@timestamp}" ]
add_field => [ "received_from", "%{host}" ]
}
syslog_pri { }
date {
match => [ "syslog_timestamp", "MMM d HH:mm:ss", "MMM dd HH:mm:ss" ]
}
mutate {
add_tag => ["forwardedsyslog"]
}
}
}
output {
elasticsearch {
hosts => [ "nodeX:9200", "nodeX:9200", "nodeX:9200" ]
index => "forwardedsyslog-%{+YYYY.MM.dd}"
}
}
I can't explain why in Kibana I can't see this difference, if I select forwardedsyslog or forwardedevtx index pattern I see all the logs, both Microsoft and Linux.
I would like to have into forwardedsyslog index only the Linux one, and into forwardedevtx only the Microsoft one, what am I missing?
Thanks!