Logstash not reading log files from Windows network share folder

Hello,

I am running Logstash 9.1.2 on Windows Server 2019, and i am trying to read logs from a network share folder - //MACHINE-1/folder$/somedir/star*/some*star.log ( read the “star” as star character ). But it doesnt read the log files.

I have verified that the user under which Logstash is running has all necessary permissions on the shared folder. Logstash is running as a service as the specific user account.

Thanks in advance.

regards

sabya

Hello and welcome,

What does your Logstash input looks like?

Keep in mind that reading files from network shares may not work as expected in Logstash, this is not something that has a lot of tets as mentioned in the documentation.

This is how the input config looks -

input {
file {
path => "//MACHINE-1/folder$/somedir//some.log"
start_position => "end"
file_completed_action => "log"
file_completed_log_path => "F:/logstash/logs/files_completed.txt"
type => "type1"
}
}

Let me add that i tried with backslash and forwardslash and double escape and so on, in the path pattern.

Another question - how to make Logstash reveal the issue it is having in reading the files? i turned logging level to debug and trace, but did not see anything helpful.

thanks and regards

sabya

Oh, this does not work, Logstash does not support Windows Network Share.

There is an old open issue about it.

It works with NFS, but they also may have some issues, reading files from network shares is not something that works well with both logstash and beats.