Logstash is not picking up the files

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 :

<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 :

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
        }
    }

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

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

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.

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

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>.

Thanks will try and keep you posted

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