<?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: Passing the argument to the shell script on custom alert action. in Alerting</title>
    <link>https://community.splunk.com/t5/Alerting/Passing-the-argument-to-the-shell-script-on-custom-alert-action/m-p/365147#M6445</link>
    <description>&lt;P&gt;Please go through below link,&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.6.3/AdvancedDev/CustomAlertConfig"&gt;http://docs.splunk.com/Documentation/Splunk/6.6.3/AdvancedDev/CustomAlertConfig&lt;/A&gt;&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.6.3/AdvancedDev/CustomAlertScript"&gt;http://docs.splunk.com/Documentation/Splunk/6.6.3/AdvancedDev/CustomAlertScript&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 03 Oct 2017 19:21:11 GMT</pubDate>
    <dc:creator>sbbadri</dc:creator>
    <dc:date>2017-10-03T19:21:11Z</dc:date>
    <item>
      <title>Passing the argument to the shell script on custom alert action.</title>
      <link>https://community.splunk.com/t5/Alerting/Passing-the-argument-to-the-shell-script-on-custom-alert-action/m-p/365146#M6444</link>
      <description>&lt;P&gt;Hey there, &lt;/P&gt;

&lt;P&gt;I've created a custom alert action on splunk. This is my directory structure:&lt;BR /&gt;
/apps&lt;BR /&gt;
      /bin&lt;BR /&gt;
           [shell script]&lt;BR /&gt;
     /default &lt;BR /&gt;
           app.conf&lt;BR /&gt;
           alert_actions.conf&lt;BR /&gt;
           data/&lt;BR /&gt;
                ui/&lt;BR /&gt;
                     alerts/&lt;BR /&gt;
                           [html file]&lt;BR /&gt;
     /appserver&lt;BR /&gt;
           /static&lt;BR /&gt;
                 [png file]&lt;BR /&gt;
     /README&lt;BR /&gt;
            /alert_actions.conf.spec&lt;/P&gt;

&lt;P&gt;I'm making use of all the 8 arguments that the splunk provides, However I want to pass an argument to the shell script which the user gives on the UI. Please help&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 16:00:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Passing-the-argument-to-the-shell-script-on-custom-alert-action/m-p/365146#M6444</guid>
      <dc:creator>alwaysumer1</dc:creator>
      <dc:date>2020-09-29T16:00:54Z</dc:date>
    </item>
    <item>
      <title>Re: Passing the argument to the shell script on custom alert action.</title>
      <link>https://community.splunk.com/t5/Alerting/Passing-the-argument-to-the-shell-script-on-custom-alert-action/m-p/365147#M6445</link>
      <description>&lt;P&gt;Please go through below link,&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.6.3/AdvancedDev/CustomAlertConfig"&gt;http://docs.splunk.com/Documentation/Splunk/6.6.3/AdvancedDev/CustomAlertConfig&lt;/A&gt;&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.6.3/AdvancedDev/CustomAlertScript"&gt;http://docs.splunk.com/Documentation/Splunk/6.6.3/AdvancedDev/CustomAlertScript&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Oct 2017 19:21:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Passing-the-argument-to-the-shell-script-on-custom-alert-action/m-p/365147#M6445</guid>
      <dc:creator>sbbadri</dc:creator>
      <dc:date>2017-10-03T19:21:11Z</dc:date>
    </item>
    <item>
      <title>Re: Passing the argument to the shell script on custom alert action.</title>
      <link>https://community.splunk.com/t5/Alerting/Passing-the-argument-to-the-shell-script-on-custom-alert-action/m-p/365148#M6446</link>
      <description>&lt;P&gt;I've gone thru it already but didn't find the solution.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Oct 2017 19:49:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Passing-the-argument-to-the-shell-script-on-custom-alert-action/m-p/365148#M6446</guid>
      <dc:creator>alwaysumer1</dc:creator>
      <dc:date>2017-10-03T19:49:21Z</dc:date>
    </item>
    <item>
      <title>Re: Passing the argument to the shell script on custom alert action.</title>
      <link>https://community.splunk.com/t5/Alerting/Passing-the-argument-to-the-shell-script-on-custom-alert-action/m-p/365149#M6447</link>
      <description>&lt;P&gt;I believe that you cannot easily do this without hacking the Splunk python code. That makes upgrades a pain. I did that for awhile. I gave up and have a variety of scripts with what I might want to pass in.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Oct 2017 20:17:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Passing-the-argument-to-the-shell-script-on-custom-alert-action/m-p/365149#M6447</guid>
      <dc:creator>burwell</dc:creator>
      <dc:date>2017-10-03T20:17:07Z</dc:date>
    </item>
    <item>
      <title>Re: Passing the argument to the shell script on custom alert action.</title>
      <link>https://community.splunk.com/t5/Alerting/Passing-the-argument-to-the-shell-script-on-custom-alert-action/m-p/365150#M6448</link>
      <description>&lt;P&gt;The username is not passed to the script.&lt;/P&gt;

&lt;P&gt;What you may need to do is include the username as part of your search results. Its messy, but it will work. You can do so with something like the following, using the append command to add an additional row containing the username. Your script will need to look for this row/field and get the username in that fashion.&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;index=_internal | stats count by component |  append [ rest /services/authentication/current-context/context | fields + username ]&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Alternatively, your script could look at the splunk internal logs, and tie a few events together to determine who is calling the script.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Oct 2017 23:34:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Passing-the-argument-to-the-shell-script-on-custom-alert-action/m-p/365150#M6448</guid>
      <dc:creator>sduff_splunk</dc:creator>
      <dc:date>2017-10-03T23:34:41Z</dc:date>
    </item>
  </channel>
</rss>

