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!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

Splunk is officially part of Cisco

Revolutionizing how our customers build resilience across their entire digital footprint.   Splunk ...

Splunk APM & RUM | Planned Maintenance March 26 - March 28, 2024

There will be planned maintenance for Splunk APM and RUM between March 26, 2024 and March 28, 2024 as ...