有誰知道如何使用logstash exec輸出插件在後臺運行命令? 我想這個配置使用logstash exec輸出插件在後臺運行命令
input {
file {
path => "file.log"
}
}
output {
exec {
command => "./script.sh fff ggg hhh jjj kkk &"
}
}
和文字內容是
#/bin/bash
echo "$*" >> file.txt
所以最後file.txt的包含&
,因爲它是參數:fff ggg hhh jjj kkk &