logstash 发送zabbix 给消息加上type
2016-09-22 10:45
176 查看
input { file { type => "zj_api" path => ["/data01/applog_backup/zjzc_log/zj-api*catalina*"] } file { type => "wj_api" path => ["/data01/applog_backup/winfae_log/wj-api*catalina*"] } } filter { multiline { pattern => "^\s+%{TIMESTAMP_ISO8601}" negate=>true what=>"previous" } mutate { add_field => [ "[@metadata][zabbix_key]" , "logstash-api-access" ] add_field => [ "[@metadata][zabbix_host]" , "dr-mysql01" ] add_field =>["messager","%{type}-%{message}"] remove_field =>["message"] } } filter { grok { match => [ "message","(?m)\s*%{TIMESTAMP_ISO8601:time}\s+(?<Level>(\S+)).*"] } date { match => ["time", "yyyy-MM-dd HH:mm:ss,SSS"] } } output { if ([Level] == "ERROR" or [message] =~ "Exception" ) and [message] !~ "温金服务未连接" { zabbix { zabbix_host => "[@metadata][zabbix_host]" zabbix_key => "[@metadata][zabbix_key]" zabbix_server_host => "192.168.32.55" zabbix_server_port => "10051" zabbix_value => "messager" } } if [type] == "zj_api" { redis { host => "192.168.32.67" data_type => "list" key => "zj_api:redis" port=>"6379" password => "1234567" } } else if [type] == "wj_api"{ redis { host => "192.168.32.67" data_type => "list" key => "wj_api:redis" port=>"6379" password => "1234567" } } }
相关文章推荐
- logstash 发送zabbix 给消息加上type
- zabbix通过skype发送报警消息之切换平台
- logstash 判断接口响应时间发送zabbix告警
- zabbix通过skype发送报警消息之弯路 推荐
- logstash 判断接口响应时间发送zabbix告警
- zabbix通过skype发送报警消息
- zabbix通过skype发送报警消息之弯路
- zabbix通过微信企业号发送图文消息 推荐
- zabbix调用telegram机器人发送报警消息
- logstash 发送慢页面到zabbix告警
- zabbix通过skype发送报警消息之切换平台
- logstash 发送慢页面到zabbix告警
- zabbix通过skype发送报警消息之安装skype
- zabbix 通过执行script发送告警消息
- zabbix通过微信模板消息发送报警
- zabbix通过skype发送报警消息之终结
- WM_SYSCOMMAND消息(点击窗口的系统菜单发送的消息)
- 应用程序间发送消息 c# SendMessage WM_COPYDATA
- 微信公众平台开发教程Java版(3) 消息接收和发送
- ActiveMQ (二) 使用Queue或者Topic发送/接受消息