如何获取Splunk仪表板中下拉列表的值列表?

发布于 2025-01-21 06:35:42 字数 365 浏览 0 评论 0原文

制作仪表板并想要创建图表。要显示指标,我必须从下拉列表中选择缓存。 我可以如何列出缓存列表

Message= [CACHE_NAME=<HERE IS THE NAME OF CACHE> method=GET <SOME_OTHER_STRINGS> found=true]

问题是,如果我有以下日志:所需的结果: :

Making a dashboard and want to create a chart. To display the metrics, I must choose cache from the dropdown. The problem is how I can make a list of caches if I have the following log:

Message= [CACHE_NAME=<HERE IS THE NAME OF CACHE> method=GET <SOME_OTHER_STRINGS> found=true]

Desired result:
enter image description here

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

我偏爱纯白色 2025-01-28 06:35:42

通过搜索缓存列表。读取日志,从中提取缓存名称,然后删除重复项。

index=foo "CACHE_NAME"
```Extract the cache name from the event```
| rex "CACHE_NAME=(?<cache_name>\S+)"
```Filter out repeated names```
| dedup cache_name
| fields cache_name

Get a list of caches by searching for them. Read the log, extract cache names from it, then remove duplicates.

index=foo "CACHE_NAME"
```Extract the cache name from the event```
| rex "CACHE_NAME=(?<cache_name>\S+)"
```Filter out repeated names```
| dedup cache_name
| fields cache_name
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文