<?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: Execute a script when a file is uploaded in Alerting</title>
    <link>https://community.splunk.com/t5/Alerting/Execute-a-script-when-a-file-is-uploaded/m-p/68519#M948</link>
    <description>&lt;P&gt;&lt;EM&gt;@martin_mueller&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;Thank you for the answer but I do not understand what you mean with "LicenseUsage". I've worked with other SIEM products but I'm a Splunk newbie.&lt;/P&gt;

&lt;P&gt;I thought to exploit the real-time search in the following manner. If I insert a bait with a string appended to the file like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;SIEM\_SOME\_UNIQUEID\_END\_OF\_LOG\_filename\_date\_time.dat
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and define an alert that runs the script when I find a record with this string and triggers the execution of a script by using the following features:&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/5.0.2/Data/Monitorfilesanddirectories"&gt;http://docs.splunk.com/Documentation/Splunk/5.0.2/Data/Monitorfilesanddirectories&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;What do you think?&lt;/P&gt;</description>
    <pubDate>Thu, 21 Mar 2013 08:59:36 GMT</pubDate>
    <dc:creator>guidovicino</dc:creator>
    <dc:date>2013-03-21T08:59:36Z</dc:date>
    <item>
      <title>Execute a script when a file is uploaded</title>
      <link>https://community.splunk.com/t5/Alerting/Execute-a-script-when-a-file-is-uploaded/m-p/68517#M946</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;we need to trigger a script that makes an SQL insert and this script needs to be triggered when a file is loaded inside Spunk, ie:&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;An external job create a log file: /upload_dir/foo_20130320_20.dat&lt;/LI&gt;
&lt;LI&gt;Splunk read and store the /upload_dir/foo_20130320_20.dat&lt;/LI&gt;
&lt;LI&gt;Splunk delete the /upload_dir/foo_20130320_20.dat after the loading&lt;/LI&gt;
&lt;LI&gt;An alert is triggered and a script executed.&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;Thanks and best regards,&lt;BR /&gt;
Guido.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 13:33:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Execute-a-script-when-a-file-is-uploaded/m-p/68517#M946</guid>
      <dc:creator>guidovicino</dc:creator>
      <dc:date>2020-09-28T13:33:38Z</dc:date>
    </item>
    <item>
      <title>Re: Execute a script when a file is uploaded</title>
      <link>https://community.splunk.com/t5/Alerting/Execute-a-script-when-a-file-is-uploaded/m-p/68518#M947</link>
      <description>&lt;P&gt;Detecting the deletion may be hard to do, however you can try fiddling with Metrics and LicenseUsage from _internal for sources that match your upload dir. Those may or may not approximate what you need.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Mar 2013 20:08:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Execute-a-script-when-a-file-is-uploaded/m-p/68518#M947</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2013-03-20T20:08:50Z</dc:date>
    </item>
    <item>
      <title>Re: Execute a script when a file is uploaded</title>
      <link>https://community.splunk.com/t5/Alerting/Execute-a-script-when-a-file-is-uploaded/m-p/68519#M948</link>
      <description>&lt;P&gt;&lt;EM&gt;@martin_mueller&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;Thank you for the answer but I do not understand what you mean with "LicenseUsage". I've worked with other SIEM products but I'm a Splunk newbie.&lt;/P&gt;

&lt;P&gt;I thought to exploit the real-time search in the following manner. If I insert a bait with a string appended to the file like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;SIEM\_SOME\_UNIQUEID\_END\_OF\_LOG\_filename\_date\_time.dat
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and define an alert that runs the script when I find a record with this string and triggers the execution of a script by using the following features:&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/5.0.2/Data/Monitorfilesanddirectories"&gt;http://docs.splunk.com/Documentation/Splunk/5.0.2/Data/Monitorfilesanddirectories&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;What do you think?&lt;/P&gt;</description>
      <pubDate>Thu, 21 Mar 2013 08:59:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Execute-a-script-when-a-file-is-uploaded/m-p/68519#M948</guid>
      <dc:creator>guidovicino</dc:creator>
      <dc:date>2013-03-21T08:59:36Z</dc:date>
    </item>
  </channel>
</rss>

