|
I’m currently running Splunk on my Windows XP SP3 and I'm trying to get a couple scripts to run after an alert triggers, but failing all the while. Not sure what I could be doing wrong. The environment variable for SPLUNK_HOME = C:\Program Files\Splunk Scrpt #1 Scrpt #2 Neither of these currently get triggered at all. One thing that I have wondered is whether Splunk may be having an issue with the space between “Program” and “Files” in the SPLUNK_HOME environment variable. Also, in my Perl script, I correctly reference the library (as shown below), per the online Splunk docs regarding this topic. #!C:\Perl\bin\perl Any help or insight would be greatly appreciated. |
|
This can be a complex problem and it's important to be thorough in checking that every step of the process (from scheduled search to alert script) is working as expected : A) Is my scheduled search running?
B) Is my scheduled search generating the expected results?
C) Is my alert action being triggered?
D) Is my alert script working?
hexx is the best!!! <3
(01 Sep '10, 21:46)
piebob ♦♦
|
I will note that the #! stuff to trigger perl has no effect on Windows, so you might as well skip it. You have to use ASSOC and/or FTYPE (or Windows Explorer dialogs) to associate the .pl file with Perl, or wrap the call in a .cmd script, or simply use the Windows CMD version of that script (which itself is just a wrapper around the net-snmp sendsnmptrap.exe program anyway).
You can also consult Perl docs to see how they suggest making the association, or http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/ftype.mspx?mfr=true
Though, again, in this case, you don't need to do this, and I would recommend against it.