检测到您已登录华为云国际站账号,为了您更好的体验,建议您访问国际站服务网站 https://www.huaweicloud.com/intl/zh-cn
不再显示此消息
不支持将groupName字段配置到字段索引中。 不涉及。 logStream 字符串 不支持将logStream字段配置到字段索引中。 不涉及。 ASCII码对照表 表5 ASCII码对照表 ASCII值 控制字符 ASCII值 控制字符 ASCII值 控制字符 ASCII值 控制字符 0 NUL(空字符) 32
处理server_status日志 e_if(e_search("topic==server_status"), e_split("servers")) e_if(e_search("topic==server_status"), e_json("servers", depth=1)) e_if(e_sea
} 加工规则 e_if(e_search("content==123"), e_drop_fields("content", "age",regex=true)) 加工结果 name: twiss 更多参考 支持其他它函数组合使用。 e_keep_fields 调用e_keep_fields函数保留符合条件的日志字段。
time做格式化。 解决方案: 如果program字段值是access,则通过e_psv函数解析content内容,并删除原始字段content。 e_if(e_search("program==access"), e_compose(e_psv("content", "remote_addr, time_local
如果srcaddr和dstaddr字段不存在,丢弃。 e_if(e_not_has("srcaddr"), e_drop()) e_if(e_not_has("dstaddr"), e_drop()) # 如果srcaddr和dstaddr不符合IP地址格式,丢弃。 e_if(op_not(e_match("srcaddr"
州局点,仅针对用户内测使用,后续将全网开放,敬请期待! 场景一:过滤LTS日志 场景二:使用e_set函数为日志空缺字段赋值 场景三:删除和重命名字段(e_drop_fields函数和e_rename函数) 场景四:转换日志参数类型(v函数、cn_int函数和dt_totimestamp函数)
direction=\"W\"/><neighbor name=\"Colombia\" direction=\"E\"/></country></data>" } 加工规则 e_set("str_json",xml_to_json(v("str"))) 加工结果 str:<data><country
2****&vid=6.1.0_gf_pc&asb=1206427&git=&time=22-11-3+%e4%b8%8a11%e6%97%b649%e5%88%8633%e7%a7%92&operatingSystem=Windows+10++(10.0.0)+64bit&de
(ConnectionException e) { e.printStackTrace(); } catch (RequestTimeoutException e) { e.printStackTrace();
数字或数字字符串 是 待计算的值。 返回结果 返回e的次幂结果。 函数示例 测试数据 { "number": 2 } 加工规则 e_set("e_x", mat_exp(v("number"))) 加工结果 number: 2 e_x: 7.38905609893065 mat_fabs
} 加工规则 e_set("version",ip_version(v("ip"))) 加工结果 ip: 10.21.115.10 version: IPv4 Ipv6地址。 测试数据 { "ip": "2001:0db8:85a3:0000:0000:8a2e:0370:7334"
"ctx1": "true" } 加工规则 e_set("op_not", op_not(v("ctx1"))) 加工结果 ctx1: true op_not: false 示例2: 测试数据 { "ctx1": 345 } 加工规则 e_set("op_not", op_not(v("ctx1")))
"time": "2019-07-10 14:58:19" } 加工规则 e_set("Shanghai_timestamp", dt_parsetimestamp(v("time"), tz="Asia/Shanghai")) e_set("Los_Angeles_timestamp", d
n。 返回结果 修改后的字符串。 函数示例 示例1:删除空格。 测试数据 { "source":" lts" } 加工规则 e_set("str_strip", str_strip(v("source"))) 加工结果 source: lts str_strip:
"iZbp1a65x3r1vhpe94fi2qZ" } 加工规则 e_set("regex", regex_select(v("str"), r"\d+")) e_set("regex2", regex_select(v("str"), r"\d+", mi=None)) e_set("regex3", regex_select(v("str")
加工规则1 e_set("time2", dt_add(v("time1"), year=2018)) 加工结果1 { "time1": "2019-06-04 2:41:26", "time2": "2018-06-04 02:41:26" } 加工规则2 e_set("time2"
"number": 2 } 加工规则 e_set("int_number", ct_int(v("number"))) 加工结果 number: 2 int_number: 2 示例2:将十六进制转换成十进制。 测试数据 { "number": AB } 加工规则 e_set("int_number"
数据富化 从OBS获取csv文件进行数据富化 使用e_dict_map、e_search_dict_map函数进行数据富化 构建字典与表格进行数据富化 使用DSL加工函数过滤VPC流日志公网流量 父主题: 日志加工(邀测)
10:10:10+08:00", "tz": "Asia/shanghai" } 加工规则 e_set("dt_astimezone",dt_astimezone(v("time"), v("tz"),reset=false)) e_set("dt_astimezone_true",dt_astimezone(v("time")
"time" : "2019-06-04 2:41:26" } 加工规则 e_set("timestamp", dt_parsetimestamp(v("time"), tz="America/Los_Angeles")) e_set("Shanghai_time", dt_parse(v("timestamp")