<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Splunk Alert-Trigger in Windows - doesn't work well in Alerting</title>
    <link>https://community.splunk.com/t5/Alerting/Splunk-Alert-Trigger-in-Windows-doesn-t-work-well/m-p/167124#M2742</link>
    <description>&lt;P&gt;Hi Sbeamro,&lt;BR /&gt;
i am not able to get the complete details as the symbols got omitted in your comment. But what i can understand is you want to include the alert subject in your SMS !? You can take advantage  of the parameters which will supply you the values directly. Don't mention the $alert variable while mentioning the script file in the alert set up page. Please see the below argument values.&lt;BR /&gt;
`&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Arg Environment Variable    Value
0   SPLUNK_ARG_0    Script name`

1   SPLUNK_ARG_1    Number of events returned

2   SPLUNK_ARG_2    Search terms

3   SPLUNK_ARG_3    Fully qualified query string

4   SPLUNK_ARG_4    Name of report

5   SPLUNK_ARG_5    Trigger reason.

For example, "The number of events was greater than 1."

6   SPLUNK_ARG_6    Browser URL to view the report.

7   SPLUNK_ARG_7    Not used for historical reasons.

8   SPLUNK_ARG_8    File in which the results for the search are stored.

Contains raw results.
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;`&lt;/P&gt;</description>
    <pubDate>Mon, 05 Jan 2015 11:29:34 GMT</pubDate>
    <dc:creator>linu1988</dc:creator>
    <dc:date>2015-01-05T11:29:34Z</dc:date>
    <item>
      <title>Splunk Alert-Trigger in Windows - doesn't work well</title>
      <link>https://community.splunk.com/t5/Alerting/Splunk-Alert-Trigger-in-Windows-doesn-t-work-well/m-p/167121#M2739</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;
I have an .exe client that I can use in order to send SMS with my SMS server.&lt;BR /&gt;
I've made a simple batch file - test.bat&lt;BR /&gt;
on the batch file I've wrote 2 lines - &lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;snsClient.exe -zSMSSERVER:1234&lt;BR /&gt;
-rPHONENUMBER -sALERT -iSYSLOG -sTest Test msg.exe Administrator Hi1&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;when I run the batch file - it works , I'm seeing a message on the screen and I'm getting an SMS.&lt;/P&gt;

&lt;P&gt;I've got the file under C:\Program Files\Splunk\bin\scripts\&lt;BR /&gt;
I've also go the snsclient.exe &amp;amp; DLLs to the same folder.&lt;BR /&gt;
I've ran the batch file - and it works.&lt;/P&gt;

&lt;P&gt;Over Splunk - under the "run script" I wrote - test.bat&lt;/P&gt;

&lt;P&gt;when the alert is triggering I'm getting an email &amp;amp; I'm getting the message on the screen - which means the msg.exe is working - which means that it does run the .bat file !&lt;/P&gt;

&lt;P&gt;yet - the bat file for some reason doesn't run the .exe file when the splunk is running the .bat file.&lt;BR /&gt;
when I'm running the bat file - it does work.&lt;/P&gt;

&lt;P&gt;please help !&lt;/P&gt;

&lt;P&gt;P.S.&lt;BR /&gt;
there is only 1 user over the Windows 2008 R2 Server which is Administrator , the splunk service is running under this service.&lt;/P&gt;</description>
      <pubDate>Sun, 04 Jan 2015 16:39:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Splunk-Alert-Trigger-in-Windows-doesn-t-work-well/m-p/167121#M2739</guid>
      <dc:creator>sbeamro</dc:creator>
      <dc:date>2015-01-04T16:39:16Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Alert-Trigger in Windows - doesn't work well</title>
      <link>https://community.splunk.com/t5/Alerting/Splunk-Alert-Trigger-in-Windows-doesn-t-work-well/m-p/167122#M2740</link>
      <description>&lt;P&gt;Use error logging in the bat file or put the bat file in someother location and try to trigger with absolute path. &lt;/P&gt;</description>
      <pubDate>Mon, 05 Jan 2015 04:12:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Splunk-Alert-Trigger-in-Windows-doesn-t-work-well/m-p/167122#M2740</guid>
      <dc:creator>linu1988</dc:creator>
      <dc:date>2015-01-05T04:12:59Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Alert-Trigger in Windows - doesn't work well</title>
      <link>https://community.splunk.com/t5/Alerting/Splunk-Alert-Trigger-in-Windows-doesn-t-work-well/m-p/167123#M2741</link>
      <description>&lt;P&gt;Hi linu, &lt;BR /&gt;
thanks for your help !&lt;BR /&gt;
I have modified to have the full location and changed to it be c:\&lt;BR /&gt;
and it works !&lt;BR /&gt;
thanks a lot for your help !&lt;/P&gt;

&lt;P&gt;I do have another question - &lt;BR /&gt;
in order to send the SMS I need to use the following context - &lt;BR /&gt;
C:\snsClient.exe -z:1234 -r -sALERT -iSYSLOG -s*&lt;EM&gt;'&lt;/EM&gt;&lt;EM&gt;**'&lt;/EM&gt;*&lt;/P&gt;

&lt;P&gt;I've tried to write on the bat file the follows - &lt;BR /&gt;
C:\snsClient.exe -z1.1.1.1:1234 -r055555555 -sALERT -iSYSLOG -s&lt;BR /&gt;
and then I wrote on the the alert script over splunk the follows - &lt;BR /&gt;
test.bat $alert&lt;BR /&gt;
I've also tried test.bat SMS TEST &lt;/P&gt;

&lt;P&gt;and it doesn't work.&lt;/P&gt;

&lt;P&gt;any idea how can I use it to work ?&lt;BR /&gt;
I would like have in between the &lt;STRONG&gt;`&lt;/STRONG&gt; &lt;STRONG&gt;`&lt;/STRONG&gt; the raw data.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 18:31:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Splunk-Alert-Trigger-in-Windows-doesn-t-work-well/m-p/167123#M2741</guid>
      <dc:creator>sbeamro</dc:creator>
      <dc:date>2020-09-28T18:31:46Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Alert-Trigger in Windows - doesn't work well</title>
      <link>https://community.splunk.com/t5/Alerting/Splunk-Alert-Trigger-in-Windows-doesn-t-work-well/m-p/167124#M2742</link>
      <description>&lt;P&gt;Hi Sbeamro,&lt;BR /&gt;
i am not able to get the complete details as the symbols got omitted in your comment. But what i can understand is you want to include the alert subject in your SMS !? You can take advantage  of the parameters which will supply you the values directly. Don't mention the $alert variable while mentioning the script file in the alert set up page. Please see the below argument values.&lt;BR /&gt;
`&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Arg Environment Variable    Value
0   SPLUNK_ARG_0    Script name`

1   SPLUNK_ARG_1    Number of events returned

2   SPLUNK_ARG_2    Search terms

3   SPLUNK_ARG_3    Fully qualified query string

4   SPLUNK_ARG_4    Name of report

5   SPLUNK_ARG_5    Trigger reason.

For example, "The number of events was greater than 1."

6   SPLUNK_ARG_6    Browser URL to view the report.

7   SPLUNK_ARG_7    Not used for historical reasons.

8   SPLUNK_ARG_8    File in which the results for the search are stored.

Contains raw results.
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;`&lt;/P&gt;</description>
      <pubDate>Mon, 05 Jan 2015 11:29:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Splunk-Alert-Trigger-in-Windows-doesn-t-work-well/m-p/167124#M2742</guid>
      <dc:creator>linu1988</dc:creator>
      <dc:date>2015-01-05T11:29:34Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Alert-Trigger in Windows - doesn't work well</title>
      <link>https://community.splunk.com/t5/Alerting/Splunk-Alert-Trigger-in-Windows-doesn-t-work-well/m-p/167125#M2743</link>
      <description>&lt;P&gt;YAY I got it to work !&lt;BR /&gt;
I really apprecaite your help ! &lt;/P&gt;</description>
      <pubDate>Mon, 05 Jan 2015 12:18:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Splunk-Alert-Trigger-in-Windows-doesn-t-work-well/m-p/167125#M2743</guid>
      <dc:creator>sbeamro</dc:creator>
      <dc:date>2015-01-05T12:18:47Z</dc:date>
    </item>
  </channel>
</rss>

