-2

I am a newbie on elastic-stack. I setup a elastic-stack and filebeat on Ubuntu 16.04 on local environment. Now I want to read log files from a specific directory. In my case LogFile is my directory which is placed on Ubuntu desktop. I want to know how to read the logs from that file and display on Kibana dashboard.

Thanks for the help.

mmvsbg
  • 3,570
  • 17
  • 52
  • 73
Muhammad Hassan
  • 235
  • 1
  • 2
  • 7
  • I'm pretty sure you'd find a good guide if you take the time to search. But that's not the purpose of this site. "Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource are off-topic for Stack Overflow" – baudsp Oct 11 '18 at 12:43

1 Answers1

1

It is quite simple. Very basic deployment: read about beats (easier) or Logstash (when you read from the file, you must be aware of watcher).

To start with you can use the simplest version of a Logstash config:

input {
  file {
   path => "/var/log/yourlog.log"
   start_position => "beginning"
 }
}

filter {
#your filter etc, by default you will parse everything into messages
}


output {
    elasticsearch {
        hosts =>  ["your_elasticsearch:9200"]
        index => "your_index"
    }
}
creed
  • 172
  • 2
  • 13