I am newbie to logstash and trying to ship logs using logstash agent to splunk server. But having trouble shipping the logs. Need help / guidance.
Below is my log format:
2018.07.12.12:34:31:232 GID=xxx FID=asdf STRT=12121322
2018.07.15.14:34:31:232 GID=yyy FID=fdsa STRT=12421121
and my logstash conf is as given below:
input {
file {
path => "/logs/app.log"
start_position => beginning
}
filter {
grok {
match => { "message" => "%{SYSLOGPROG:logdata}%{SPACE}%{GREEDYDATA:msg} }
}
date {
match => ["logdata", "YYYY.MM.dd.HH:mm:ss:SSS"]
target => "logdata"
}
kv {
source => msg
trim => "="
target => "kv"
}
}
output {
tcp {
host => "splunkhost.net"
port => "18604"
}