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.
Thank you for the reply. I do the change but it doesn't work.
Could you confirm that if I want to change the timestamp by the date inside message, I have to edit my 12-apache.conf in /etc/logstash/conf.d ?
And could I put 3 folder for analyse ? I put 3 path inside the 12-apache.conf.
you should only need to restart logstash, not elasticsearch nor kibana. Can you please copy and paste one of your lines you are grokking. it will make it much easier to debug.
You can have multipile paths, that is fine. you can also have multiple date match filters such as:
Sorry, I don't understand well this line ("Can you please copy and paste one of your lines you are grokking"). Are you looking for the example of line in the logs ? Or a specific line in the logstash configuration ?
The YYYY should be lowercase.
I checked this in a date filter test that passes:
describe "test test test" do
config <<-CONFIG
filter {
date {
match => [ "thedate", "dd/MMM/yyyy:HH:mm:ss Z" ]
}
}
CONFIG
sample("thedate" => "04/Mar/2017:23:47:48 +0100") do
expect(subject.get("@timestamp").to_s).to eq("2017-03-04T22:47:48.000Z")
end
end
Sometimes when I edit the logstash configuration file, I have some issue to start my filebeat service (SSL client failed to connect).
Do you have any idea about this ? Sorry, I'm beginning with this tool.
I modify my logstash configuration, but on Kibana I still have the problem with the timestamp. It doesn't take the date of my log file. Here the configuration, I have see some topic talking about this problem but it doesn't working for me.
filter {
if [type] == "apache-access" {
grok {
match => { "message" => "%{COMBINEDAPACHELOG}" }
}
}
date {
match => [ "timestamp" , "dd/MMM/yyyy:HH:mm:ss Z" ]
remove_field => ["timestamp"]
target => "@timestamp"
}
}
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.