Hi guys,
I'm new in the ELK universe. I have a trouble with the date of my log. On kibana, Timestamp shows the date when I put it on my server but not when the log were created. I try to modify my logstash configuration but it doesn't change.
Here the look of my log file
And the logstash configuration (etc/logstash/conf.d/12-apache-conf)
input {
file {
path => "/var/log/apache2/coc/*.log"
start_position => beginning
}
}
filter {
if [path] =~ "access" {
mutate { replace => { "type" => "apache_access" } }
grok {
match => { "message" => "%{COMBINEDAPACHELOG}" }
}
} else if [path] =~ "error" {
mutate { replace => { type => "apache_error" } }
}
date {
match => [ "mytimestamp", "yyyy/MM/dd:HH:mm:ss:SSSZ" ]
locale => "en"
add_tag => [ "tsmatch" ]
}
locale => "en"
}
}
output {
elasticsearch { host => localhost }
file { path => "/tmp/logstash.out"}
}
I see some topics on the forum but I don't find the solution.
Thanks for your help!
Regards !
Michael