The objective is to periodically export the search result as a file in a pre-defined folder as
While there are ways to export search results (docgen, ODTS, manually exporting, etc)
However, is there a way to retrieve the list of files stored in a folder? If so, kindly suggest the same.
TIA, Mitesh.
miteshvohra - if I understand your question correctly then dir >opfile (where opfile is a name of your choice) under Windows and ls commands under Linux will list the files in a folder for you. Staying inside Splunk though, the results from a search can be 'saved and shared' - then are available from the Jobs manager...but I suspect you already know that?
Br
Dave
...or you could give him access to Splunk (?), a little training on Search and he can answer his own questions arising from his time away? 😉
miteshvohra - I would err on the side of the Win box so the dir >filename option. That creates a file for you, next task is to use that file (I guess) in a drop down from a dashboard...which is back in Splunk assuming it can 'see' that directory the saved weekly reports and index file are in. The dir command would need to go in a dot bat file to be run and scheduled per the business frequency / on demand. Are you ok with dash builds, drop downs etc? If so, then good luck and heres hoping you have another happy customer.
A customer once threw a question at us that, he would like to look at some of the weekly reports out of the system when he is back from a short vacation or business trip. Which is why a list of exported reports on a dashboard would be handy for him to randomly pick and review what happened during his absence. Hence the question.
Dave: thanks for the reply. Splunk Server runs on Linux while the reports are saved on a Win-box. In that case, which command would be applicable?