logstash配置output到exec

场景

监控文件内容发送告警

配置

input {
    stdin {
        type => 'demo-stdin'
        add_field => {"test" => "hello"}
        codec => "plain"
        tags => ["stdin-test"]
    }
}

output {
    exec {
        command => "/usr/bin/php /data/test/test/test.php \"%{message}\" "
    }
}

备注

尽量不要执行消耗时间程序



Tagged , , , . Bookmark the permalink.

Comments are closed.