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
Revered Legend

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!

Enterprise Security Content Update (ESCU) | New Releases

In December, the Splunk Threat Research Team had 1 release of new security content via the Enterprise Security ...

Why am I not seeing the finding in Splunk Enterprise Security Analyst Queue?

(This is the first of a series of 2 blogs). Splunk Enterprise Security is a fantastic tool that offers robust ...

Index This | What are the 12 Days of Splunk-mas?

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