Getting Data In

Stamping dates onto report PDFs

watsm10
Communicator

Hello,
I'm reasonably new to Splunk. I've created a scheduled search which runs weekly and links to a report showing the number of transactions we made last week. I want to put the "from" and "to" dates of that week in the header of the report, so that it is clear which week the report relates to. All I can get at the moment is the day that the report is printed on. Can anyone help?

lguinn2
Legend

I can't figure out a simple way to do this - but there is a way to show the date range of events that are covered by a search. Assume that your original search looked like this

yoursearchstuffhere
| stats count

Add this to include the date range

yoursearchstuffhere
| stats earliest(_time) as From latest(_time) as To count as "Number of Transactions"
| fieldformat From=strftime(From,"%x %X") 
| fieldformat To=strftime(To,"%x %X") 
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

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

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...