Dashboards & Visualizations

How do I display the current date (month and year) in the title of a dashboard?

chris_thuys
Path Finder

How can I display the current month and year ie "January 2015" in the title of a dashboard, ( not the search date)

Tags (4)
0 Karma

risgupta
Path Finder

/code
| makeresults
| eval prevWeekDate=strftime((now(),"-7d"),"%Y/%m/%d")
| table prevWeekDate
1

$result.prevWeekDate$

0 Karma

lguinn2
Legend

Ah, this requires a trick or two. You can't really put the date in a heading, but you could create a single value panel at the top of the dashboard, and this single value panel could contain the following search:

index=main | head 1 | eval month_year=strftime(now(),"%B %Y") | table month_year

Actually, I'll bet that you can put the data in a heading, if you write some javascript etc. I think the above method is pretty simple.

0 Karma

chris_thuys
Path Finder

Thanks for that. I'll try it out.

0 Karma
Get Updates on the Splunk Community!

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!

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

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...