Getting Data In

Passing Custom Variable to Trigger shell script?

jitter
New Member

There are 9 parameters that are passed to the Shell script from Splunk, with the one being unused. Is it possible to use that 7th (depreciated) variable to pass a field like ServerName or some such?

(http://www.splunk.com/base/Documentation/latest/Admin/Configurescriptedalerts)

Right now we have a global scheduled search across servers to trigger an SNMP trap ... it would be nice to be able to pass a specific server name along with the other information currently sent.
This can be done if an individual report is created for each server, but that would be tedious.

Thoughts?

~jt

Tags (3)
0 Karma

richprescott
Path Finder

You can read the Splunk_Arg_8 parameter passed, parse the contents of the file for ServerName and use that.

If you do not have a program for converting GZ to CSV, Splunk includes a command-line converter called minigzip.exe in %SPLUNK_HOME%\bin.

0 Karma
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 ...