Losgtash no genera salida desde input file

Buenas tardes,

Estoy tratando de configurar la lectura de un archivo .gz con Logstash y al ver que no me generaba ninguna salida intenté leer un archivo txt, encontrando que tampoco me genera la salida estandar.

Mi archivo de configuración es el siguiente:

input {
file {
path => "C:\LOGSSS\Logstash\logstash-7.1.1\log\GZ\Ejemplo2.txt"
start_position => "beginning"
type => "log"
sincedb_path => "NUL"
ignore_older => "0"
}
}
filter {
}
output {
stdout { codec => rubydebug }
}

Y en la salida de la consola no me indica ningun error...

PS C:\LOGSSS\Logstash\logstash-7.1.1> .\bin\logstash.bat -r -f .\config\logstash-GZ.conf
Sending Logstash logs to C:/LOGSSS/Logstash/logstash-7.1.1/logs which is now configured via log4j2.properties
[2019-06-13T13:00:50,473][WARN ][logstash.config.source.multilocal] Ignoring the 'pipelines.yml' file because modules or
command line options are specified
[2019-06-13T13:00:50,489][INFO ][logstash.runner ] Starting Logstash {"logstash.version"=>"7.1.1"}
[2019-06-13T13:00:56,177][INFO ][logstash.javapipeline ] Starting pipeline {:pipeline_id=>"main", "pipeline.workers"=

4, "pipeline.batch.size"=>125, "pipeline.batch.delay"=>50, "pipeline.max_inflight"=>500, :thread=>"#<Thread:0x175f2e2 r
un>"}
[2019-06-13T13:00:56,927][INFO ][logstash.javapipeline ] Pipeline started {"pipeline.id"=>"main"}
[2019-06-13T13:00:56,989][INFO ][logstash.agent ] Pipelines running {:count=>1, :running_pipelines=>[:main], :
non_running_pipelines=>}
[2019-06-13T13:00:56,989][INFO ][filewatch.observingtail ] START, creating Discoverer, Watch with file and sincedb coll
ections
[2019-06-13T13:00:57,411][INFO ][logstash.agent ] Successfully started Logstash API endpoint {:port=>9600}

Use / instead of \ in the path option of a file filter.

Hi @Badger, I made the change of \ by / and Logstash still not generate output.

This says to ignore any files older than zero seconds, which is all files. Remove this.

Thanks @Badger, I removed the ignore_older and it works!!! :slight_smile:

The new configuration file is:

input {
file {
path => "C:/LOGSSS/Logstash/logstash-7.1.1/log/GZ/Ejemplo2.txt"
start_position => "beginning"
type => "log"
sincedb_path => "NUL"
}
}
filter {
}
output {
stdout { codec => rubydebug }
}

The next step is read a file .gz, and the configuration file that works for this is:

input {
file {
path => "C:/LOGSSS/Logstash/logstash-7.1.1/log/GZ/archivos*.gz"
start_position => "beginning"
type => "log"
sincedb_path => "NUL"
mode => "read"
file_completed_action => "log"
file_completed_log_path => "C:/LOGSSS/Logstash/logstash-7.1.1/log/gz-local-read-file-mode-completed.log"
}
}
filter {
}
output {
stdout { codec => rubydebug }
}

Thanks for all @Badger!! :slight_smile:

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.