Alerting

Is there a way to configure a custom file name for the exported CSV file attached in saved search alert emails?

vasanthmss
Motivator

Hi,

By default, Splunk will export CSV files attached as “splunk-results.csv” and deliver it in the email. Is there a way we can configure our custom file name? like "customname1.csv" or based on the saved search name?

Thanks,
V

V
Labels (2)
1 Solution

somesoni2
Revered Legend

xpac
SplunkTrust
SplunkTrust

As I had the same problem (and this is the first result on Google), I figured out a permanent solution that can be customized per alert.

In savedsearches.conf, go to your alert, and add this line:

action.email.reportFileName = here-goes-your-filename-without-csv-extension

Splunk will then use that setting, add .csv and attach that file to your alert email. As far as I understand it, every setting from alert_actions.conf can be overridden in savedsearches.conf, e.g.

# alert_actions.conf
[email]
reportFileName = something

equals

# savedsearches.conf
alert.email.reportFileName = something

Swap reportFileName with the setting of your choice 😉

0 Karma

knalla
Path Finder

I tried this, it din't work.

0 Karma

ppablo
Retired

Hi @vasanthmss

I noticed you upvoted @somesoni2's answer, but you didn't accept it. If his answer solved your question, please be sure to resolve the post by clicking "Accept" directly below his answer. Always do this for all of your questions that have a working answer.

0 Karma

somesoni2
Revered Legend
Get Updates on the Splunk Community!

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...

Splunk APM: New Product Features + Community Office Hours Recap!

Howdy Splunk Community! Over the past few months, we’ve had a lot going on in the world of Splunk Application ...

Index This | Forward, I’m heavy; backward, I’m not. What am I?

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