I'm trying to execute a custom 5 minutes duration bash script in logstash using exec input plugin.
but imposible to get output.
Trying things, i realized that redirecting the script stdout to stderr the script makes output, but I can't handle the stderr with filter plugins.
Someone knows the solution?
Many thanks !
# Works
echo "Content" 1>&2
# Not Works
echo "Content" 1>
input {
exec {
command => "bash conf.d/script.d/script.sh"
interval => 120
codec => line
}
}
filter {
dissect { mapping => {"message" => "%{[server][domain]}"} }
mutate { remove_field => ["event", "message", "process", "@version", "host"] }
}
output {
stdout {codec => rubydebug}
}