【发布时间】:2021-12-05 06:49:56
【问题描述】:
我有以下问题
<base query> | rex field=msg "HTTP/1.1\\\" (?<http_status>\d{3})"
| where http_status=200 OR http_status=401
| eval event_date=strftime(_time, "%x")
| chart count over event_date by http_status
这给了我下表
event_date 200 401
========== === ===
11/28/21 61 24
11/29/21 295 96
但是,我需要一个额外的列来显示状态 401 与总数相比的百分比,即“401”/(“200”+“401”),如下所示:
event_date 200 401 401 percentage
========== === === ==============
11/28/21 61 24 28.24%
11/29/21 295 96 24.55%
谁能告诉我怎么做?非常感谢。
【问题讨论】:
标签: splunk splunk-query