首页
学习
活动
专区
圈层
工具
发布

logstash配置output到exec

场景

监控文件内容发送告警

配置

代码语言:javascript
代码运行次数:0
复制
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}\" "
    }
}

备注

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

下一篇
举报
领券