<?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: Problem with scripted alert in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Problem-with-scripted-alert/m-p/491773#M84039</link>
    <description>&lt;P&gt;thanks , i have read this a lot of times, but i cant resolve the problem.&lt;/P&gt;

&lt;P&gt;can you help me with this configuration?&lt;/P&gt;</description>
    <pubDate>Fri, 13 Mar 2020 18:25:04 GMT</pubDate>
    <dc:creator>tinpelayee</dc:creator>
    <dc:date>2020-03-13T18:25:04Z</dc:date>
    <item>
      <title>Problem with scripted alert</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Problem-with-scripted-alert/m-p/491770#M84036</link>
      <description>&lt;P&gt;Hello plp, &lt;/P&gt;

&lt;P&gt;I am making an alert, that export a csv , the problem here is when this .csv is exported, only have rw permissions and i want to have rw-r. I make a script that convert this file with the permissions i want, but is dont working. I have read all the doc of configurating scripted alerts, but i cant resolve this problem. &lt;/P&gt;

&lt;P&gt;Can anyone helpme? &lt;/P&gt;</description>
      <pubDate>Fri, 13 Mar 2020 17:44:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Problem-with-scripted-alert/m-p/491770#M84036</guid>
      <dc:creator>tinpelayee</dc:creator>
      <dc:date>2020-03-13T17:44:43Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with scripted alert</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Problem-with-scripted-alert/m-p/491771#M84037</link>
      <description>&lt;P&gt;Scripted alert action is officially deprecated. Use custom alert action. Check this page to convert scripted action to custom alert action.&lt;/P&gt;

&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/8.0.2/AdvancedDev/CustomAlertConvertScripted" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/8.0.2/AdvancedDev/CustomAlertConvertScripted&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Simple steps to create an app for custom alert action:&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Step 1:&lt;/STRONG&gt; Create new app script_custom_alert_action and create app.conf and alert_actions.conf like below. Copy configuration files to &lt;STRONG&gt;script_custom_alert_action/default&lt;/STRONG&gt;.&lt;/P&gt;

&lt;P&gt;app.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; [ui]
 is_visible = 0
 label = Scripted Custom Alert Action

 [launcher]
 description = Scripted Custom Alert Action

 [install]
 state = enabled
 is_configured = 1 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;alert_actions.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; [scriptcustomalert]
 is_custom = 1
 label = Scripted Custom Alert Action
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;Step 2:&lt;/STRONG&gt; Rename your script. &lt;STRONG&gt;Script name must be same as stanza name in alert_actions.conf&lt;/STRONG&gt;. Example scriptcustomalert.py or scriptcustomalert.sh. Put it in &lt;STRONG&gt;script_custom_alert_action/bin&lt;/STRONG&gt;.&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Step 3:&lt;/STRONG&gt; Create default.meta and copy it in &lt;STRONG&gt;script_custom_alert_action/metadata&lt;/STRONG&gt;. This enables all users to configure custom alert action for their alerts in any app. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[]
access = read : [ * ], write : [ admin ]
export = system
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;Step 4&lt;/STRONG&gt;: Deploy app and restart splunk. New action "Scripted Custom Alert Action" will appear in alert action list on UI in alert configurations and you can select it and verify.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 04:34:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Problem-with-scripted-alert/m-p/491771#M84037</guid>
      <dc:creator>manjunathmeti</dc:creator>
      <dc:date>2020-09-30T04:34:00Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with scripted alert</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Problem-with-scripted-alert/m-p/491772#M84038</link>
      <description>&lt;P&gt;thanks , i have read this a lot of times, but i cant resolve the problem. &lt;/P&gt;

&lt;P&gt;can you help me with this configuration? &lt;/P&gt;</description>
      <pubDate>Fri, 13 Mar 2020 18:22:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Problem-with-scripted-alert/m-p/491772#M84038</guid>
      <dc:creator>tinpelayee</dc:creator>
      <dc:date>2020-03-13T18:22:07Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with scripted alert</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Problem-with-scripted-alert/m-p/491773#M84039</link>
      <description>&lt;P&gt;thanks , i have read this a lot of times, but i cant resolve the problem.&lt;/P&gt;

&lt;P&gt;can you help me with this configuration?&lt;/P&gt;</description>
      <pubDate>Fri, 13 Mar 2020 18:25:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Problem-with-scripted-alert/m-p/491773#M84039</guid>
      <dc:creator>tinpelayee</dc:creator>
      <dc:date>2020-03-13T18:25:04Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with scripted alert</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Problem-with-scripted-alert/m-p/491774#M84040</link>
      <description>&lt;P&gt;Updated my answer.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Mar 2020 18:38:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Problem-with-scripted-alert/m-p/491774#M84040</guid>
      <dc:creator>manjunathmeti</dc:creator>
      <dc:date>2020-03-13T18:38:44Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with scripted alert</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Problem-with-scripted-alert/m-p/491775#M84041</link>
      <description>&lt;P&gt;i can created but my script doesnt change the permissions of the csv &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Mar 2020 20:02:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Problem-with-scripted-alert/m-p/491775#M84041</guid>
      <dc:creator>tinpelayee</dc:creator>
      <dc:date>2020-03-13T20:02:06Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with scripted alert</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Problem-with-scripted-alert/m-p/491776#M84042</link>
      <description>&lt;P&gt;I tested with below python script and it's working. Check with this script.&lt;/P&gt;

&lt;P&gt;&lt;A href="https://github.com/manjunath-meti/myfirstrepo/blob/master/scriptcustomalert.py"&gt;scriptcustomalert.py&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Search query I used:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal earliest=-5m | stats count by sourcetype | outputcsv test.csv
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 14 Mar 2020 09:35:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Problem-with-scripted-alert/m-p/491776#M84042</guid>
      <dc:creator>manjunathmeti</dc:creator>
      <dc:date>2020-03-14T09:35:59Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with scripted alert</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Problem-with-scripted-alert/m-p/491777#M84043</link>
      <description>&lt;P&gt;Thanks Bro, it works!!!! &lt;/P&gt;</description>
      <pubDate>Mon, 16 Mar 2020 12:17:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Problem-with-scripted-alert/m-p/491777#M84043</guid>
      <dc:creator>tinpelayee</dc:creator>
      <dc:date>2020-03-16T12:17:46Z</dc:date>
    </item>
  </channel>
</rss>

