Hello guys,
I am new to Logstash, i have configured logstash to process syslog messages and it is creating indexes every day but i need single index for syslog messages. (I have understand logstash will create indexes based on @timestamp) pls help me,,
#logstash.conf
input {
udp {
port => 514
type => syslog
}
}
filter {
if [type] == "syslog" {
grok {
match => { "message" => "%{SYSLOG5424SD:time_stamp} %{WORD:conn_type} -- %{WORD:action}.*SRC=%{IP:src_ip} DST=%{IP:dst_ip}.PROTO=%{WORD:proto} SPT=%{WORD:src_port} DPT=%{WORD:dst_port}." }
add_field => [ "received_at", "%{@timestamp}"]
add_field => [ "received_from", "%{host}" ]
}
}
}
output {
elasticsearch { hosts => ["es-1:9200","es-2:9200"] }
stdout { codec => rubydebug }
}
Thanks,
Rajkumar