Quantcast
Channel: Questions in topic: "splunk-enterprise"
Viewing all articles
Browse latest Browse all 47296

Can I use Powershell as the script triggered by Custom Alert Actions?

$
0
0
When using scripted alert actions I defined a bat file which the alert triggered. The .bat-file was really just a "proxy" since I was not able to trigger the Powershell script directly from Splunk, so instead I used a .bat file which again triggered the Powershell-script like this C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -Version 2 -NoProfile -File "D:\Splunk\etc\apps\myTa-app\bin\alertMonitoring" %* alert-1-noRunningMessagingEngines But now when converting to Custom Alert Actions I have not fully understood if I can still use this approach. All examples found here [http://docs.splunk.com/Documentation/Splunk/6.6.0/AdvancedDev/ModAlertsIntro][1] shows only Python examples, and I have a hard time understanding how to read the payload (stdin) in a bat/cmd-file and the be able to forward it to my Powershell-script. Is this doable or do I have to install Python on the server when using scripts in Custom Alert Actions? [1]: http://docs.splunk.com/Documentation/Splunk/6.6.0/AdvancedDev/ModAlertsIntro

Viewing all articles
Browse latest Browse all 47296

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>