Reporting

Export Link

Sriram
Communicator

I am displaying the results of my search using simpleresultstable module, I would like to add a "Export" link in the panel to export the results to csv file. (Similar to the one in search / flashtimeline results grapharea). How can I do that.

1 Solution

Sriram
Communicator

Thanks. I agree regarding the lack of documentation. I actually made it work couple of days ago (pretty similar to what you did), but did not have time to update the post. Thanks again for your help. Here is my snippet. This will show the results in the table with export link on bottom right corner.

index=xxx.......


......

.........



....


result

View solution in original post

0 Karma

somesoni2
SplunkTrust
SplunkTrust

You would have to define 'layoutPanel' property for your Export module. This should be same as the layout where your event table is displayed (panel_row2_col1 in your case)

Sriram
Communicator

Thanks. I agree regarding the lack of documentation. I actually made it work couple of days ago (pretty similar to what you did), but did not have time to update the post. Thanks again for your help. Here is my snippet. This will show the results in the table with export link on bottom right corner.

index=xxx.......


......

.........



....


result

0 Karma

brettcave
Builder

A note for those of you copying and pasting from this example (I am running Splunk 5 on Linux). it should be "layoutPanel", not "layoutpanel". Using all lowercase results in the export module not necessarily being attached to the correct location.

0 Karma

kmattern
Builder

As usual Splunk’s documentation does not do anything to clarify how to use the export module. After a little trial and error I discovered the best way to use it. Here is a snippit of Advanced XML showing how I use it. I put exports on all my interactive forms, charts and table views. For the most part I put the Export Module immediately before the Paginator module.

The important things to bear in mind is to place the Export Module layoutPanel in the same layoutPanel that the paginator lives. In your case you would make the layoutPanel the same as your JobProgressIndicator layoutPanel, panel1_row2_col1.

Also it is important to insure that the exportType is the same as the entityName, either results or events. I have used results almost exclusively but a couple of my Simple XML conversions to Advanced XML have converted to events instead of results. Just check your code and you should be OK. After placing a few Export Modules you will get the hang of it.

<module name="JobStatus">
  <module name="Export" layoutPanel="panel_row1_col1">
    <param name="exportType">results</param>
  </module>
    <module name="Paginator" layoutPanel="panel_row1_col1" group="Data Received">
      <param name="count">20</param>
      <param name="entityName">results</param>

MarioM
Motivator

in your Advanced XML you need the Export module:

<module name="Export" layoutPanel="pageControls">
             <param name="exportType">event</param>
</module>
0 Karma

Sriram
Communicator

I am not sure where I am doing wrong. I have a search module with inline search, which displays results using simpleresultstable module. I have export module defined. I don't see export link in the panel. Here the snippet.

results
True
.....

10
results

result
....

0 Karma
Get Updates on the Splunk Community!

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...