Logstash not reading files changes

I have Logstash installed and im reading a file that is remote and also i have created a pipeline for a local file. I was thinking at the beginning that the issue was the remote file but the local one is not read at all either.
I should be missing something.

my pipelines.yml config is like this

- pipeline.id: frontdesk
  config.string: |
    input { file {
       path => "\\palace-dev\wwwroot\PalsoftWebApi\file.log"
       start_position => beginning 
       
    
    } }
    filter {
       # Weblog filter statements here...
    }
    output {
     stdout {}
       elasticsearch {
            hosts => [ "http://sc-elk-01:9200" ]            
            index => "frontdesklog-%{+YYYY.MM.dd}"
        }
    }
    
  
  
- pipeline.id: logstash
  config.string: |
    input { file {
       path => "D:\ElasticSearch\logstash\logs\logstash-plain.log"
       start_position => beginning 
       
    
    } }
    filter {
       # Weblog filter statements here...
    }
    output {
     stdout {}
       elasticsearch {
            hosts => [ "http://sc-elk-01:9200" ]            
            index => "logtashssss-%{+YYYY.MM.dd}"
        }
    }

and the log in logtash at the end have this.
> [2019-09-12T13:59:18,492][INFO ][logstash.javapipeline ] Pipeline started {"pipeline.id"=>"logstash"}

[2019-09-12T13:59:18,498][INFO ][logstash.javapipeline    ] Pipeline started {"pipeline.id"=>"frontdesk"}
[2019-09-12T13:59:18,607][INFO ][logstash.agent           ] Pipelines running {:count=>2, :running_pipelines=>[:frontdesk, :logstash], :non_running_pipelines=>[]}
[2019-09-12T13:59:18,634][INFO ][filewatch.observingtail  ] START, creating Discoverer, Watch with file and sincedb collections
[2019-09-12T13:59:18,643][INFO ][filewatch.observingtail  ] START, creating Discoverer, Watch with file and sincedb collections
[2019-09-12T13:59:19,431][INFO ][logstash.agent           ] Successfully started Logstash API endpoint {:port=>9600}

so I'm assuming config is fine. but nothing is printed in the console and nothing is sent to elastic.

any help will be really appreciated.

Thank you

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

Thank you, yes it works with the forward slash. Thanks

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