0

I was learning logstash. Have a very simple config file..

input {
    file {
        path => "D:\b.log"
        start_position => beginning
    }
}
# The filter part of this file is commented out to indicate that it is
# optional.
filter {
  grok {
    match => { "message" => "%{LOGLEVEL:loglevel}" }
  }
}
output {
    stdout { codec => rubydebug }
}

The input file is just this:

INFO

I am running logstash on windows and the command is

logstash -f logstash.conf

I expect the output to be shown on the console to ensure that its working. But logstash produces no output, just the logstash config messages..

D:\Installables\logstash-2.0.0\logstash-2.0.0\bin>logstash -f logstash.conf
io/console not supported; tty will not be manipulated
Default settings used: Filter workers: 2
Logstash startup completed

I have deleted the sincedb file and tried. Is there something that i am missing?

Shabin Hashim
  • 677
  • 1
  • 10
  • 23

1 Answers1

1

I think this answers your question:

How to force Logstash to reparse a file?

It looks like you are missing the quotes around "beginning" and the other post recommends redirecting sincedb to dev/null. I don't know if there is a windows equivalent for that. I did use that as well, and it worked fine.

As an alternative, what I do now is to configure stdin() as input so that I don't have to worry about anything else.

Community
  • 1
  • 1
pandaadb
  • 6,306
  • 2
  • 22
  • 41
  • thanks for pointing towards using stdin(). Now i am able to debug. Any idea about not reading the file? I have deleted the sincedb file before each run. isnt that enough? – Shabin Hashim Nov 10 '15 at 14:03
  • I thought that that should be enough. I am fairly new to logstash myself and have never tried it on windows. Did the file ever work? I read that there is sometimes issue with the file input for windows. https://logstash.jira.com/browse/LOGSTASH-430 – pandaadb Nov 10 '15 at 14:11
  • Ooh thanks. I found a workaround, Once logstash is started, i can edit the input file, save it and then logstash parses the file. .Easy. Thanks for the help..:) – Shabin Hashim Nov 10 '15 at 14:19