All Apps and Add-ons

Can the Splunk for Excel Export app be used with dashboards/panels built using Splunk out of the box features in Simple XML?

Communicator

Hi All,

I have couple of questions related to Splunk Excel export app.

Can the excel export app be used with the dashboards/panels which are built using splunk out of the box features in xml format?

I have been able to use the Excel export app with the dashboards/panels built using Sideview utils app.

However i have bunch of dashboards/panels which are built using xml and DO NOT make use of any Sideview utils app.

Can you share some sample example as to how we can incorporate excel export in normal dashboards/panels?

Can you also share any documentation/sample examples if any available around this? I didn't find much on the splunk documentation site.

Probably this is basic question, but i wanted to put it out here while i continue to explore options of how this can be achieved.

Below is sample mock up code for 1 of my panels which ....

<dashboard>
<label>Employee Breakdown by Department</label>
<row>
<panel>
      <table>
       <search>
          <query>index=employee_data | stats count(employee_id) by Department</query>
          <earliest>-24h</earliest>
          <latest>now</latest>
        </search>
      </table>
   </panel>
  </row>
</dashboard>

How can we add excel export code to the above example such that i can see the excel export button and export the employee data.

Thank you in advance.

1 Solution

Contributor

As a follow-up, here is what it looks like if you integrate entirely via Simple XML (using the new search event handler available in Splunk Enterprise 6.3) with the Splunk for Excel Export App installed.

Note that the link to export will only be displayed when the search is done (otherwise, it is hidden).

<dashboard>
  <label>Test Excel</label>
  <row>
    <panel>
      <chart>
        <title>Top Sourcetypes</title>
        <search>
          <query>index=_internal | top sourcetype</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
          <done>
            <set token="search_sid">$job.sid$</set>
          </done>
        </search>
        <option name="charting.chart">bar</option>
        <option name="charting.legend.placement">right</option>
      </chart>
      <html depends="$search_sid$">
        <a href="/custom/excel_export/excel/$search_sid$">Export to Excel</a>
      </html>
    </panel>
  </row>
</dashboard>

Kudos to Nick Filippi for this solution.

View solution in original post

Communicator

Is it possible to export multiple tables from on dashboard to excel,With the stock version of the above method, probably not. You may be able to create some customer javascript that could do it.

0 Karma

Contributor

As a follow-up, here is what it looks like if you integrate entirely via Simple XML (using the new search event handler available in Splunk Enterprise 6.3) with the Splunk for Excel Export App installed.

Note that the link to export will only be displayed when the search is done (otherwise, it is hidden).

<dashboard>
  <label>Test Excel</label>
  <row>
    <panel>
      <chart>
        <title>Top Sourcetypes</title>
        <search>
          <query>index=_internal | top sourcetype</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
          <done>
            <set token="search_sid">$job.sid$</set>
          </done>
        </search>
        <option name="charting.chart">bar</option>
        <option name="charting.legend.placement">right</option>
      </chart>
      <html depends="$search_sid$">
        <a href="/custom/excel_export/excel/$search_sid$">Export to Excel</a>
      </html>
    </panel>
  </row>
</dashboard>

Kudos to Nick Filippi for this solution.

View solution in original post

Communicator

This solution fails in Splunk 6.6.1 version.
for HTML tag "depends" attribute removed in Splunk 6.6.1
http://docs.splunk.com/Documentation/Splunk/6.6.1/Viz/PanelreferenceforSimplifiedXML

My earlier Splunk version 6.5.2 works fine, as it has "depends" attribute in HTML tag
http://docs.splunk.com/Documentation/Splunk/6.5.2/Viz/PanelreferenceforSimplifiedXML

Any other Solution to resolve this issue?

0 Karma

Communicator

This works now, issue was with user roles.

0 Karma

Path Finder

Thanks too David and Nick. We still are using 6.2.2 , dint get chance to try this out and have used some other alternative for my original ask. Will give it a shot when we get there , glad to know praveen was able to use it and it works.

0 Karma

Path Finder

Just tried this in 6.4 ...it works...thanks David and Nick!!

0 Karma

Hi @davidpaper, is there any way to download different panels as different excels/csv under one button click using above method?

0 Karma

Contributor

With the stock version of the above method, probably not. You may be able to create some customer javascript that could do it.

0 Karma

New Member

@can we use it on post process ?

0 Karma

Communicator

This works. Thanks David and Nick.

0 Karma

Communicator

Any solution for this?

0 Karma

Path Finder

In need of something similar ...any suggestions out there? Can splunk excel export app be used for panesl built using out of the box traditional xml based dahshboards/panels?

0 Karma
State of Splunk Careers

Access the Splunk Careers Report to see real data that shows how Splunk mastery increases your value and job satisfaction.

Find out what your skills are worth!