博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Filter plugins ? mutate:
阅读量:5335 次
发布时间:2019-06-15

本文共 1803 字,大约阅读时间需要 6 分钟。

filter {    grok {        match => [             "message" , "\s*%{IPORHOST:clientip}\s+\-\s+\-\s+\[%{HTTPDATE:time}\]\s+\"%{WORD:verb}\s+(?
(\S+))\?.*\s+HTTP/%{NUMBER:httpversion}\"\s+%{NUMBER:http_status_code}\s+%{NUMBER:bytes}\s+(%{BASE16FLOAT:request_time})\s+%{IPORHOST:remoteip}", "message" ,"\s*%{IPORHOST:clientip}\s+\-\s+\-\s+\[%{HTTPDATE:time}\]\s+\"%{WORD:verb}\s+(?
(\S+))\s+HTTP/%{NUMBER:httpversion}\"\s+%{NUMBER:http_status_code}\s+%{NUMBER:bytes}\s+(%{BASE16FLOAT:request_time})\s+%{IPORHOST:remoteip}", "message" ,"\s*%{IPORHOST:clientip}\s+\-\s+\-\s+\[%{HTTPDATE:time}\]\s+\"%{WORD:verb}\s+(?
(\S+))\s+HTTP/%{NUMBER:httpversion}\"\s+%{NUMBER:http_status_code}\s+\-\s+(%{BASE16FLOAT:request_time})\s+%{IPORHOST:remoteip}", "message","\s*%{IPORHOST:clientip}\s+\-\s+\-\s+\[%{HTTPDATE:time}\]\s+\"%{WORD:verb}\s+(?
(\S+))\s+HTTP/%{NUMBER:httpversion}\"\s+%{NUMBER:http_status_code}\s+\-\s+(%{BASE16FLOAT:request_time})\s+(%{IPORHOST:remoteip}|-)" ] } mutate { convert => [ "request_time", "float"] add_field =>["response_time","%{request_time}"] remove_field =>["request_time"] add_field => [ "[@metadata][zabbix_key]" , "logstash-api-access" ] add_field => [ "[@metadata][zabbix_host]" , "dr-mysql01" ] add_field =>["messager","%{type}-%{message}"] remove_field =>["message"] }Filter plugins ? mutate:mutate 插件 允许你执行一般的mutations 在字段上,你可以rename, remove, replace, and modify fields in your events.简介:插件支持下下面的配置选项:需要的配置选项mutate {}

转载于:https://www.cnblogs.com/zhaoyangjian724/p/6199121.html

你可能感兴趣的文章
苹果官方例子
查看>>
C#中结构体与字节流互相转换
查看>>
WIN10配置MongoDB
查看>>
iOS resign code with App Store profile and post to AppStore
查看>>
python 表格操作
查看>>
LeetCode 84. Largest Rectangle in Histogram
查看>>
LeetCode Two Sum III - Data structure design
查看>>
session和xsrf
查看>>
Cookie与Session
查看>>
配置redis外网可访问
查看>>
跟随大神实现简单的Vue框架
查看>>
Linux目录结构
查看>>
learning awk
查看>>
LeetCode-Strobogrammatic Number
查看>>
luoguP3414 SAC#1 - 组合数
查看>>
五一 DAY 4
查看>>
关于System.__ComObject一些问题
查看>>
java stringbuffer二
查看>>
[hihoCoder] 拓扑排序·一
查看>>
(转)接口测试用例设计(详细干货)
查看>>