What is “Smart Exporter”:
The goal was to provide a “plug and play” solution to have a better pdf export.
This application is a client side solution , fully implemented using python and JavaScript (PhantomJS is required only if scheduling PDF export will be used).
How to install it :
Just UNTAR the folder into etc/apps (or use the Splunk> GUI).
When you open the smart exporter application for the first time you will be redirected to the setup page.
You can ignore this step (keep fields empty and save), if you will not use the scheduling export feature.
Requirement to schedule export :
- Splunk Credentials : a Splunk user/password having access to exported dashboards
- PhantomJS bin path
- Mail server information (host, port, user, …)
The application contains 3 samples dashboards : panels grouping, custom stylesheet, custom dataviz.
How to use it :
Once installed:
1- open the dashboard to be exported and add a new panel.
2- Select “Smart PDF Exporter” as data visualization.
3- Enter any generating command as a search text (e.g |makeresults )
4- Move the new panel to the first row and save.
5- Just click on the “smart export” button to start exporting current dashboard to PDF format.
Options:
How Scheduling PDF export works :
For security reasons , only users with the role “can_schedulepdf” are allowed to schedule PDF export.
This role is provided inside the application and contain needed capabilities to schedule searches and to access application passwords.
Panel screenshot:
Adding the “smart Exporter” button will add a new feature to the current dashboard : panel screenshot.
A new button will appear just next to the refresh button under each panel.
Clicking on it will take a screenshot of the current panel and download the picture.
Inputs and tokens:
Tokens and inputs values are a part of the dashboard’s url.
user can so generate a PDF export by token(s) value(s) :
e.g :
guest_authentications_failed_last_60min.pdf
and guest_authentications_failed_last_24h.pdf are 2 pdf generated from the same dashboard but with 2 different inputs.
-> if inputs are inserted in a row , the smart exporter application will add selected values to the generated PDF :
<row><panel> <input type="multiselect" token="usage">…</input></panel></row>
Compatibilities :
Logs and investigation :
Smart Exporter will generate three log files under var/log/splunk/:
- smartexporter_services.log : logs generated by python helpers
- smartexporter.log : logs generated by custom endpoints
- exportpdf.log : custom command logs
Use of this application is subject to your acceptance of the Splunk Software License Agreement - including limitations around your use and distribution of exported content owned and licensed to you by Splunk.
As a Splunkbase app developer, you will have access to all Splunk development resources and receive a 10GB license to build an app that will help solve use cases for customers all over the world. Splunkbase has 1000+ apps from Splunk, our partners and our community. Find an app for most any data source and user need, or simply create your own with help from our developer portal.