All Apps and Add-ons

Export results when using a SavedSearch and a PostProcess

dsheldon
Explorer

I am trying to use "SearchControls" to allow users to download a csv of the results table. I am also using a saved search then a PostProcess to generate the table. However, when the export link is used the results of the saved search are downloaded.

This is the hierarchy of my modules

SavedSearch
PostProcess
Pager
SearchControls
Table

The table is correctly displaying the results after the PostProcess while the SearchControls export command only returns the results of the SavedSearch. How can I fix this so I can export the same data that is shown in the Table?

1 Solution

laserval
Communicator

Unfortunately, it does not seem to be possible to export results from a post-process search in Advanced XML. It is apparently possible in the REST interface, so perhaps you could write a Web Framework app that can do the export.

Here's some details from @sideview: http://answers.splunk.com/answers/93758/export-results-from-a-postprocess

I ran into the same thing today, and I decided a short-term fix is to encourage users to click the link to the search, then export the results from that. Of course, that only works if your search is not very heavy to begin with.

View solution in original post

0 Karma

sideview
SplunkTrust
SplunkTrust

If you update to Sideview Utils 3.0, the SearchControls module does now correctly take postProcess searches into account when you export.

http://sideviewapps.com/apps/sideview-utils/

0 Karma

laserval
Communicator

Unfortunately, it does not seem to be possible to export results from a post-process search in Advanced XML. It is apparently possible in the REST interface, so perhaps you could write a Web Framework app that can do the export.

Here's some details from @sideview: http://answers.splunk.com/answers/93758/export-results-from-a-postprocess

I ran into the same thing today, and I decided a short-term fix is to encourage users to click the link to the search, then export the results from that. Of course, that only works if your search is not very heavy to begin with.

0 Karma

sideview
SplunkTrust
SplunkTrust

Sideview Utils 3.0 released today, and at least if you're writing Sideview-style views and you're using the Sideview SearchControls module, exports using that module do now take postProcess searches into account. It doesn't incorporate anything from the new framework to do so - Sideview Utils now just implements its own custom controller for export and the SearchControls module now uses that control instead of the core one.

http://sideviewapps.com/apps/sideview-utils/

dsheldon
Explorer

Thanks I will look into the REST interface.

In this case I am using the saved search and post process since the combined search takes a long time to finish.

0 Karma
Get Updates on the Splunk Community!

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...