Splunk Search

fill chart x-axis if data is missing

hunyady
Explorer

Hi,
I have a search, want to show two lines of counts by min in a chart. Want to have value 0 if there is no result in some minute.
i.E.
time typ=A typ=B
12:30 100 110
12:31 100 ---
12:32 --- ---
12:33 40 50
etc.
I want to have the values of "0" at 12:32 too in my graph.
other problem:
By chart is "span=1m" not accepted, I don't have result by "chart count by typ span=1m" only by "chart count by typ"
thank you

Tags (2)
0 Karma

woodcock
Esteemed Legend

Your text is extremely difficult to understand but maybe this is what you seek:

... | timechart span=1m count by type
0 Karma

richgalloway
SplunkTrust
SplunkTrust

Try

... | chart cont=false count by typ

or

... | fillnull value=0 typ | chart count by typ
---
If this reply helps you, Karma would be appreciated.
0 Karma
Get Updates on the Splunk Community!

Preparing your Splunk Environment for OpenSSL3

The Splunk platform will transition to OpenSSL version 3 in a future release. Actions are required to prepare ...

Deprecation of Splunk Observability Kubernetes “Classic Navigator” UI starting ...

Access to Splunk Observability Kubernetes “Classic Navigator” UI will no longer be available starting January ...

Now Available: Cisco Talos Threat Intelligence Integrations for Splunk Security Cloud ...

At .conf24, we shared that we were in the process of integrating Cisco Talos threat intelligence into Splunk ...