splunk - 使用日志中的值在 splunk 中的统计图表
问题描述
我是 Splunk 仪表板的新手。我需要一些有关此类数据的帮助。
2020-09-22 11:14:33.328+0100 org{abc} INFO 3492 --- [hTaskExecutor-1] c.j.a.i.p.v.b.l.ReadFileStepListener : [] read-feed-file-step ended with status exitCode=COMPLETED;exitDescription= with compositeReadCount 1 and other count status as: BatchStatus(readCount=198, multiEntityAccountCount=0, readMultiAccountEntityAdjustment=0, accountFilterSkipCount=7, broadRidgeFilterSkipCount=189, writeCount=2, taskCreationCount=4)
我想在仪表板中显示上述日志中的所有整数值的统计信息。
编辑1:
我试过这个但没有工作。
index=abc xyz| rex field=string .*readCount=(?P<readCount>\d+) | table readCount
解决方案
我解决了这个问题
index=xyz |regex ".*fileName=(\s*([\S\s]+))" | rex field=string .*compositeReadCount=(?P<compositeReadCount>\d+) |regex ".*readCount=(?P<readCount>\d+)" | regex ".*multiEntityAccountCount=(?P<multiEntityAccountCount>\d+)" | regex ".*readMultiAccountEntityAdjustment=(?P<readMultiAccountEntityAdjustment>\d+)" | regex ".*accountFilterSkipCount=(?P<accountFilterSkipCount>\d+)" | regex ".*broadRidgeFilterSkipCount=(?P<broadRidgeFilterSkipCount>\d+)" | regex ".*writeCount=(?P<writeCount>\d+)" | regex ".*taskCreationCount=(?P<taskCreationCount>\d+)" | regex ".*status=(\s*([\S\s]+))" | table _time fileName compositeReadCount readCount multiEntityAccountCount readMultiAccountEntityAdjustment accountFilterSkipCount broadRidgeFilterSkipCount writeCount taskCreationCount status
推荐阅读
- javascript - 为什么等待服务器响应后不执行代码行
- python - 'TypeError:在尝试模拟异常时不允许捕获不从 BaseException 继承的类'
- python - 如何在 python 中调用使用命令行界面的 Web 服务?
- javascript - 如何使用 JavaScript 查找一个字符是否在字符串中多次出现?
- c - 如果存在等于给定数字的数字组合,则打印
- macos - macOS 上的终端/iTerm2 窗口名称:如何取消 SSH 以显示下一个进程?
- javascript - 将对象传播到参数中?
- algorithm - 将椭圆弧拟合到点或其他曲线
- node.js - 在 Discord.js 中查找所有具有角色的成员
- javascript - 无法读取未定义和未定义的属性“纬度”