Cannot input log with regular expression


#1

Please let me question about regular expression for logstash

Logstash version:1.5.4

I'd like to input MPLog-xxxxxxxx-xxxxxx.log that is log of Windows Defender.
(There is C:\ProgramData\Microsoft\Windows Defender\Support\MPLog-xxxxxxxx-xxxxxx.log)

  • xxx is random number.

So I configured logstash.conf as the below.

----- @ logstash.conf -----
input {
file {
path => "C:\ProgramData\Microsoft\Windows Defender\Support*.log"
}
}
----- @ logstash.conf -----

But logstash cannot input the log using regular expression although logstash can input if it don't use regular expression.

Could you tell me solution ?

Best regards,
Tyler


(Shaunak Kashyap) #2

Try changing your path separator from \ to /.


#3

Hi Shaunak,

Thank you for your answer !

I could collect the log.

Thanks,

Tyler


(system) #4