Reporting

Save and store results of reports for later use

horsefez
SplunkTrust
SplunkTrust

Hi fellow splunkers,

my question for today is, if I could somehow save reports for later use.
For example:
I run a report everyday at midnight over the data that got collected yesterday. I want to save the reported data into CSV or PDF.
I want to store the report for at least 10 days so users have 10 days to view it in splunk.
I also want to give users some kind of list, where they then are able to click on a report.


Is it possible to save the reported data and store it somewhere for later use?
Is it possible to save a history of reports for a specific time period and let a user choose which report they wanna view?

Best regards,
pyro_wood

0 Karma
1 Solution

woodcock
Esteemed Legend

We used the collect command to save the report details to a Summary Index and then created a macro (you could also create a form) to reconstitute the results. Before sending the data to collect, we added |addinfo|streamstats current=f count as serial to mark each line number and add the info_sid so that the event ordering can be reconstituted and different sets of data (reports) can be discriminated.

View solution in original post

woodcock
Esteemed Legend

We used the collect command to save the report details to a Summary Index and then created a macro (you could also create a form) to reconstitute the results. Before sending the data to collect, we added |addinfo|streamstats current=f count as serial to mark each line number and add the info_sid so that the event ordering can be reconstituted and different sets of data (reports) can be discriminated.

sonila
Path Finder

can you help with an example of how to do this?

0 Karma

horsefez
SplunkTrust
SplunkTrust

Amazing, thank you!
Can you add somekind of example search, so I can image this a bit better?

0 Karma

woodcock
Esteemed Legend

To get data back just do something like this:

index=MySummaryIndex info_sid=MyReportSid | sort 0 serial | table My List Of Fields And Their Order Here
0 Karma

horsefez
SplunkTrust
SplunkTrust

Great! This isn't as complex as I thought it is.
Thank you woodcock for your excellent help!

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