Getting Data In

Is it possible to invoke a script on forwarder as an alert post action?

Sidharda
Path Finder

I have my Splunk Enterprise running on Windows and forwarder on AIX. I have configured an alert for my desired condition.
I need to run a script that is present on my forwarder as post alert action. Is that possible to access forwarder scripts from a search head where I trigger a post script?

1 Solution

dwaddle
SplunkTrust
SplunkTrust

Well, sure - but it's not trivial. You'll have to write code. I would suggest having something that can run on your search head, and use ssh to connect back to the UF to run the script. You'll need an SSH client on your windows search head that is scriptable - you might find something like Fabric (http://www.fabfile.org/) helpful.

View solution in original post

0 Karma

dwaddle
SplunkTrust
SplunkTrust

Well, sure - but it's not trivial. You'll have to write code. I would suggest having something that can run on your search head, and use ssh to connect back to the UF to run the script. You'll need an SSH client on your windows search head that is scriptable - you might find something like Fabric (http://www.fabfile.org/) helpful.

0 Karma

Sidharda
Path Finder

Thx dwaddle,

I have written a simple script on my SH to connect to my UF and run a script on UF. I have used the PLINK (PuttyLINK) to establish the connection.

0 Karma

aaraneta_splunk
Splunk Employee
Splunk Employee

@Sidharda - Did the answer provided by dwaddle provide a solution to your question? If yes, please don't forget to resolve this post by clicking "Accept". If no, please leave a comment with more feedback. Thanks!

0 Karma
Get Updates on the Splunk Community!

Introducing Splunk Enterprise 9.2

WATCH HERE! Watch this Tech Talk to learn about the latest features and enhancements shipped in the new Splunk ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...