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!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

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