Splunk Search

How can I add the current month to a timechart if that current month has no results?

andrewtrobec
Motivator

Hello All,
Assuming the following timechart

| timechart count span=1mon

If there are no results for the current month splunk will omit it completely. This means that if I run the command today (February 5th, 2019), I will have:

_time,count
2018-11,43
2018-12,23
2019-01,65

Instead, what I'd like to have is:

_time,count
2018-11,43
2018-12,23
2019-01,65
2019-02,0

How can I achieve this?

Thank you and best regards,

Andrew

0 Karma

DMohn
Motivator

Try adding a makecontinuous _time span=1mon - this should give you the desired result.

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 ...