i am using the last versions of logstash, kibana and elasticsearch
In fact i have two problem, and i hope that you can help me
the first problem is that if i add an other log in access.log, the
logstash read all the other logs !!! is that a bug or what ??, and how i
specifie to logstash to read just the new log ??
This my code :
input {
file {
path => "/root/elastic/access.log"
type => "apache"
}
}
The second problem is that the Kibana generate a syslog automaticly(@timestamp)!!
so how can i stop this generation and tell kibana to use just the logs specified in the file.
Problem 2 look at the "date" filter which you can use the source data instead of the indexing date
Problem 1 , based on your configuration it will only read in the access.log. If you had a * or directory name that might be a different story but you specify a file name so no other files should be read in
if i add a logs and i save, my file will be like that :
15/06/2015:10:41:24:114
14/06/2015:10:41:24:114
14/06/2015:10:42:24:114
14/06/2015:10:43:24:114
14/06/2015:10:44:24:114
so kibana read also the other old logs and i will have 9 logs instead of 5 !!
Using the file input on a file and adding lines to that file using an editor will in fact produce what you described because when saving the file from the editor, a new inode is created and the file input treat it as a new file.
To test you should append lines to your file using, for example in Linux:
$ echo "foobar" >> /root/elastic/access.log
Now, for the timestamp parsing, do you have any _grokparsefailure or _dataparsefailure tags in your events?
Kibana generate a logs automaticly, with type logs or syslog, what i want is to stop this generation or to not display it in the discover, i wanna to kibana to read just the logs from my file logs and display it
Kibana is a tool to visualize logs over time. For the "over time" part to be useful there must be a notion of time in the data, and the idea is to have Logstash extract that from the logs (and it happens to store it in the @timestamp field). If you just want to display the raw logs I'm not sure what use Kibana is to you.
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.