I have tried by running the following script in the input section providing a wrong input file path
but it did not show any error message after running the script:
input {
file {
path => "C:\DataSet\EXP_DATA.csv"
start_position => beginning
sincedb_path=>"dev/null"
}
}
filter {
....
}
output {
....
}
` I have tried giving the ruby script in input section as shown below:
input {
ruby {
file {
code => '
begin
path => "C:\DataSet\EXP_DATA.csv"
start_position => beginning
sincedb_path=>"dev/null"
rescue => e
event.set("Error_Msg",e.to_s())
else
event.set("Error_Msg","no Error")
end
'
}
}
}
filter {
....
}
output {
....
}
it gave me the following error :
It looks like there is no ruby plugin available for input section,
could you please help me out in getting the error message and handling it in 'input' section of logstash.
Is there any way that we can handle validations in 'input' section of logstash.
Thanks in advance.