Splunk Search

サーチ結果をダッシュボードに載せると結果が変わる

appleman
Contributor

下記サーチをダッシュボードに載せると結果が変わってしまうのですが、原因はなんでしょうか。
サーチ結果では前週比がでるはずが、ダッシュボードに載せるとその数が足された結果になってしまいます。


source=test id=*
[| stats count | addinfo
| eval earliest=relative_time(info_min_time,"-7d@d")
| eval latest=relative_time(info_min_time, "@d")
| return earliest latest ]
| eval total=(count_a + count_b + countc)

| stats sum(total) as total
| append [search source=test id=*
| eval total=(count_a + count_b + count_c)
| stats sum(total) as total ]
| stats range(total) as total
| rangemap field=total low=5000-10000 elevated=10001-20000 default=severe

-7d@d
now

前週比
10
true

0 Karma

melonman
Motivator

How about something like this?

index=_internal splunkd earliest=-14d@w0 latest=@w0 
| bucket _time span=1w 
| stats count by _time 
| delta count as delta 
| where isnotnull(delta) 
| table delta 
0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...