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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...