# Logstash is not picking up the files

**URL:** <https://discuss.elastic.co/t/logstash-is-not-picking-up-the-files/232132>\
**Category:** Logstash\
**Created:** [May 12, 2020, 5:07am UTC](https://discuss.elastic.co/t/logstash-is-not-picking-up-the-files/232132 "2020-05-12T05:07:39Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![srinjan\_dutta](https://avatars.discourse-cdn.com/v4/letter/s/35a633/32.png) [@srinjan\_dutta](https://discuss.elastic.co/u/srinjan_dutta)\
**Post date:** [May 12, 2020, 5:07am UTC](https://discuss.elastic.co/t/logstash-is-not-picking-up-the-files/232132/1 "2020-05-12T05:07:39Z")

</div>

Hi All,  
I am stuck with this for 3 -4 weeks . I have a configuration file as below and trying to pick up a xml file using logstash. I have used all the resources available under the sun to resolve it but to no avail. It just won't work. Can anyone please help me out?Would be much appreciated. Here is the code.  
File to be picked up :

```auto
<stations lastupdate = "1512117393150" version = "2.0">
<station>

<id>2</id>
<name> xyz station</name>
<termnalName>31001</terminalName>
<lastcommitWithServer>1512117359697</lastCommitwithServer>
<lat>38.85725</lat>
<long>77.0533200</long>
<installed>true</installed>
<locked>false</locked>
<installDate>0</installDate>
<temporary>false</temporary>
<public>true</public>
<nbBikes>6</nbBikes>
<latestUpdateTime>151210259134</latestUpdateTime>

</station>
</stations>

```

Config file :

```auto
input {
     file {
            path => "C:\Users\sdutta\Desktop\kiblogs\*"
            start_position => "beginning"
            sincedb_path => "NUL"
       
       type => "xml"
      codec => multiline {
                pattern => "<stations>" 
                negate => "true"
                what => "previous"
            }
     
     }
    }

    filter {
        xml {
            source => "message"
            store_xml => false
            target => "stations"
            xpath => [
                "/stations/station/id/text()", "station_id",
                "/stations/station/name/text()", "station_name"
            ]
        }
    }

    output {

        stdout {
            codec => rubydebug
        }
    }

```

---

<div class="post-metadata">

**Author:** ![ptamba](https://avatars.discourse-cdn.com/v4/letter/p/7feea3/32.png) [@ptamba](https://discuss.elastic.co/u/ptamba)\
**Post date:** [May 12, 2020, 2:04pm UTC](https://discuss.elastic.co/t/logstash-is-not-picking-up-the-files/232132/2 "2020-05-12T14:04:25Z")

</div>

if you specify the exact file name in the path, does it work? have you reset your sincedb\_path?

---

<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:** [May 12, 2020, 2:35pm UTC](https://discuss.elastic.co/t/logstash-is-not-picking-up-the-files/232132/3 "2020-05-12T14:35:16Z")

</div>

Do not use backslash in the path option of a file input. Use forward slash.

---

<div class="post-metadata">

**Author:** ![srinjan\_dutta](https://avatars.discourse-cdn.com/v4/letter/s/35a633/32.png) [@srinjan\_dutta](https://discuss.elastic.co/u/srinjan_dutta)\
**Post date:** [May 13, 2020, 7:24am UTC](https://discuss.elastic.co/t/logstash-is-not-picking-up-the-files/232132/4 "2020-05-13T07:24:45Z")

</div>

Thanks for the reply. i tried with exact file name and the sincedb\_path is already set to "NUL " forcing it to reset(right? correct me if wrong). Also deleted all .sincedb file and restarted !!!!Still no luck . Any other workaround would be much appreciated.

---

<div class="post-metadata">

**Author:** ![srinjan\_dutta](https://avatars.discourse-cdn.com/v4/letter/s/35a633/32.png) [@srinjan\_dutta](https://discuss.elastic.co/u/srinjan_dutta)\
**Post date:** [May 13, 2020, 7:26am UTC](https://discuss.elastic.co/t/logstash-is-not-picking-up-the-files/232132/5 "2020-05-13T07:26:11Z")

</div>

Thanks for the reply. i tried with exact file name and forward slash. Still no luck!! Any other workaround would be much appreciated.

---

<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:** [May 13, 2020, 2:28pm UTC](https://discuss.elastic.co/t/logstash-is-not-picking-up-the-files/232132/6 "2020-05-13T14:28:40Z")

</div>

If you are trying to consume the entire file as a single event then you will need to set auto\_flush\_interval, otherwise the codec will only flush an event when it meets another occurence of \<stations\>.

---

<div class="post-metadata">

**Author:** ![srinjan\_dutta](https://avatars.discourse-cdn.com/v4/letter/s/35a633/32.png) [@srinjan\_dutta](https://discuss.elastic.co/u/srinjan_dutta)\
**Post date:** [May 14, 2020, 12:26pm UTC](https://discuss.elastic.co/t/logstash-is-not-picking-up-the-files/232132/7 "2020-05-14T12:26:47Z")

</div>

Thanks will try and keep you posted

---

<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:** [June 11, 2020, 12:29pm UTC](https://discuss.elastic.co/t/logstash-is-not-picking-up-the-files/232132/8 "2020-06-11T12:29:37Z")

</div>

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