# Logstash file input plugin

**URL:** https://discuss.elastic.co/t/logstash-file-input-plugin/332259
**Category:** Logstash
**Created:** [May 2, 2023, 10:51am UTC](https://discuss.elastic.co/t/logstash-file-input-plugin/332259 "2023-05-02T10:51:27Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Neelam\_Zanvar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/neelam_zanvar/32/103116_2.png) [@Neelam\_Zanvar](https://discuss.elastic.co/u/Neelam_Zanvar)
#### Post date: [May 2, 2023, 10:51am UTC](https://discuss.elastic.co/t/logstash-file-input-plugin/332259/1 "2023-05-02T10:51:27Z")

</div>

Hi,  
I am trying to use logstash file input plugin. I want to pick files from multiple locations and send them to different indices. Here is my config

```auto
nput {
    file {
            type => "TomEE-logs-passport"
            path => "/etc/logstash/logs/TomEE.2023-04-19.log"
    }
    file {
            type => "TomEE-access-passport"
            path => "/etc/logstash/logs/localhost_access_log..2023-04-20.txt"
    }
}
output {
    if [type] == "TomEE-logs-passport" {
       elasticsearch {
                         hosts => "http://ip:9200"
                         user => "elastic"
                         password => "pwd"
                         index => "%{type}-%{+YYYY.MM.dd}"
       }
    }
    if [type] == "TomEE-access-passport" {
        elasticsearch {
                         hosts => "http://IP:9200"
                         user => "elastic"
                         password => "pwd"
                         index => "%{type}-%{+YYYY.MM.dd}"
        }
     }
}

```

After this is do config test, it shows ok. Then i restart logstash. There are no errors but there is no data also in elastic stack. Am i missing something. I have installed the file input plugin too

---

<div class="post-metadata">

### Author: ![carly.richmond](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/carly.richmond/32/104935_2.png) [@carly.richmond](https://discuss.elastic.co/u/carly.richmond)
#### Post date: [May 3, 2023, 10:54am UTC](https://discuss.elastic.co/t/logstash-file-input-plugin/332259/2 "2023-05-03T10:54:05Z")

</div>

Hi @Neelam_Zanvar,

Can you change the logging level to debug and see if there is any additional information coming through in the logs? There is [details in the docs](https://www.elastic.co/guide/en/logstash/current/logging.html) to help.

---

<div class="post-metadata">

### Author: ![Rios](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rios/32/95745_2.png) [@Rios](https://discuss.elastic.co/u/Rios)
#### Post date: [May 3, 2023, 12:32pm UTC](https://discuss.elastic.co/t/logstash-file-input-plugin/332259/3 "2023-05-03T12:32:48Z")

</div>

And again...Your file has been read. The line tracking is recorded in [the sincedb database file](https://www.elastic.co/guide/en/logstash/current/plugins-inputs-file.html#plugins-inputs-file-sincedb_path). The sincedb can be in the runtime, if you set to null.  
Also would recommend to you to read about File Input Configuration Options.

```auto
input {
    file {
            type => "TomEE-logs-passport"
            path => "/etc/logstash/logs/TomEE.2023-04-19.log"
            start_position => "beginning" # default is end
            sincedb_path => "/dev/null"
            sincedb_clean_after => "1 hour" # this is optionally
    }

```

---

<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: [May 31, 2023, 12:33pm UTC](https://discuss.elastic.co/t/logstash-file-input-plugin/332259/4 "2023-05-31T12:33:44Z")

</div>

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