# Losgtash no genera salida desde input file

**URL:** https://discuss.elastic.co/t/losgtash-no-genera-salida-desde-input-file/185715
**Category:** Logstash
**Created:** [June 13, 2019, 6:14pm UTC](https://discuss.elastic.co/t/losgtash-no-genera-salida-desde-input-file/185715 "2019-06-13T18:14:15Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![feevv](https://avatars.discourse-cdn.com/v4/letter/f/dec6dc/32.png) [@feevv](https://discuss.elastic.co/u/feevv)
#### Post date: [June 13, 2019, 6:14pm UTC](https://discuss.elastic.co/t/losgtash-no-genera-salida-desde-input-file/185715/1 "2019-06-13T18:14:15Z")

</div>

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}

---

<div class="post-metadata">

### Author: ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)
#### Post date: [June 13, 2019, 6:29pm UTC](https://discuss.elastic.co/t/losgtash-no-genera-salida-desde-input-file/185715/2 "2019-06-13T18:29:48Z")

</div>

> [@feevv](#):
>
> path =\> "C:\LOGSSS\Logstash\logstash-7.1.1\log\GZ\Ejemplo2.txt"

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

---

<div class="post-metadata">

### Author: ![feevv](https://avatars.discourse-cdn.com/v4/letter/f/dec6dc/32.png) [@feevv](https://discuss.elastic.co/u/feevv)
#### Post date: [June 13, 2019, 6:52pm UTC](https://discuss.elastic.co/t/losgtash-no-genera-salida-desde-input-file/185715/3 "2019-06-13T18:52:10Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)
#### Post date: [June 13, 2019, 6:59pm UTC](https://discuss.elastic.co/t/losgtash-no-genera-salida-desde-input-file/185715/4 "2019-06-13T18:59:26Z")

</div>

> [@feevv](#):
>
> ignore\_older =\> "0"

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

---

<div class="post-metadata">

### Author: ![feevv](https://avatars.discourse-cdn.com/v4/letter/f/dec6dc/32.png) [@feevv](https://discuss.elastic.co/u/feevv)
#### Post date: [June 13, 2019, 7:31pm UTC](https://discuss.elastic.co/t/losgtash-no-genera-salida-desde-input-file/185715/5 "2019-06-13T19:31:25Z")

</div>

Thanks @Badger, I removed the ignore\_older and it works!!! 🙂

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!! 🙂

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [July 11, 2019, 7:31pm UTC](https://discuss.elastic.co/t/losgtash-no-genera-salida-desde-input-file/185715/6 "2019-07-11T19:31:27Z")

</div>

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