Dashboards & Visualizations

Why is my linechart with count 0 shows up as count 1?

Bleepie
Communicator

Dear Splunk community,

I have the following query:

 

 

index="myIndex"
source="*mySource*" 
nameOfLog* 
"ExitCode: 0" 
| stats count by _time

 

 

Once a day a event is generated. So either it was generated (count = 1) or it was not (count = 0).

I have a line diagram for the last 30 days that looks like this:

Bleepie_0-1646918353132.png

On February 20th there was one event generated. On 23 February there was one event generated. On 21th and 22th of February, no events were generated. Therefore I expect the line to go down in the line chart like so:

------_-------

This is not happening, and I am wondering why. How do I adjust this to show count=0 in the chart aswell? Thanks.

Labels (3)
Tags (2)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust

There are no events so nothing is charted - use timechart to generate events with zero counts

| timechart count

View solution in original post

0 Karma

venky1544
Builder

Hi @Bleepie 

did you tried

|timechart span=1d count by _time 

 

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

There are no events so nothing is charted - use timechart to generate events with zero counts

| timechart count
0 Karma
Get Updates on the Splunk Community!

Enterprise Security Content Update (ESCU) | New Releases

In December, the Splunk Threat Research Team had 1 release of new security content via the Enterprise Security ...

Why am I not seeing the finding in Splunk Enterprise Security Analyst Queue?

(This is the first of a series of 2 blogs). Splunk Enterprise Security is a fantastic tool that offers robust ...

Index This | What are the 12 Days of Splunk-mas?

December 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...