<?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: How to use Splunk to check a directory to see if it exceeds 200 files to send an alert? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-use-Splunk-to-check-a-directory-to-see-if-it-exceeds-200/m-p/347860#M63873</link>
    <description>&lt;P&gt;hello there,&lt;/P&gt;

&lt;P&gt;check out this link.&lt;BR /&gt;
you can create a scripted input based on methods 3 or 4 described in the article&lt;/P&gt;

&lt;P&gt;&lt;A href="https://www.digitalcitizen.life/4-ways-count-number-folders-and-files-inside-folder"&gt;https://www.digitalcitizen.life/4-ways-count-number-folders-and-files-inside-folder&lt;/A&gt;&lt;BR /&gt;
please share with us your results, other users might find it useful too &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;hope it helps&lt;/P&gt;</description>
    <pubDate>Tue, 30 Jan 2018 14:08:54 GMT</pubDate>
    <dc:creator>adonio</dc:creator>
    <dc:date>2018-01-30T14:08:54Z</dc:date>
    <item>
      <title>How to use Splunk to check a directory to see if it exceeds 200 files to send an alert?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-use-Splunk-to-check-a-directory-to-see-if-it-exceeds-200/m-p/347857#M63870</link>
      <description>&lt;P&gt;Using Windows version of Splunk to check a directory and if it exceeds 200 files, send an alert.&lt;/P&gt;

&lt;P&gt;Thank you for your help&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jan 2018 16:29:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-use-Splunk-to-check-a-directory-to-see-if-it-exceeds-200/m-p/347857#M63870</guid>
      <dc:creator>Falcon1</dc:creator>
      <dc:date>2018-01-29T16:29:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Splunk to check a directory to see if it exceeds 200 files to send an alert?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-use-Splunk-to-check-a-directory-to-see-if-it-exceeds-200/m-p/347858#M63871</link>
      <description>&lt;P&gt;AFAIK, there is no direct monitoring feature available to monitor a directory for number of files. What you can do is that to write a powershell script OR batch file to count the number of files (of list of files) at regular interval, and send that data to Splunk. You'd also need to setup custom sourcetype to parse this data (e.g. if you're listing all the files in that folder, use settings to get one files name per line/event). Once the data is in Splunk, you can write a search to alert  (e.g. &lt;CODE&gt;index=foo sourcetype=bar | stats count | where count&amp;gt;200&lt;/CODE&gt;). &lt;/P&gt;</description>
      <pubDate>Mon, 29 Jan 2018 16:51:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-use-Splunk-to-check-a-directory-to-see-if-it-exceeds-200/m-p/347858#M63871</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2018-01-29T16:51:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Splunk to check a directory to see if it exceeds 200 files to send an alert?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-use-Splunk-to-check-a-directory-to-see-if-it-exceeds-200/m-p/347859#M63872</link>
      <description>&lt;P&gt;Hi somesoni2,&lt;/P&gt;

&lt;P&gt;Thank you for the reply.&lt;/P&gt;

&lt;P&gt;Can I have examples for the powershell script and in the script how do I send data to Splunk?&lt;/P&gt;

&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jan 2018 11:38:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-use-Splunk-to-check-a-directory-to-see-if-it-exceeds-200/m-p/347859#M63872</guid>
      <dc:creator>Falcon1</dc:creator>
      <dc:date>2018-01-30T11:38:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Splunk to check a directory to see if it exceeds 200 files to send an alert?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-use-Splunk-to-check-a-directory-to-see-if-it-exceeds-200/m-p/347860#M63873</link>
      <description>&lt;P&gt;hello there,&lt;/P&gt;

&lt;P&gt;check out this link.&lt;BR /&gt;
you can create a scripted input based on methods 3 or 4 described in the article&lt;/P&gt;

&lt;P&gt;&lt;A href="https://www.digitalcitizen.life/4-ways-count-number-folders-and-files-inside-folder"&gt;https://www.digitalcitizen.life/4-ways-count-number-folders-and-files-inside-folder&lt;/A&gt;&lt;BR /&gt;
please share with us your results, other users might find it useful too &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;hope it helps&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jan 2018 14:08:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-use-Splunk-to-check-a-directory-to-see-if-it-exceeds-200/m-p/347860#M63873</guid>
      <dc:creator>adonio</dc:creator>
      <dc:date>2018-01-30T14:08:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Splunk to check a directory to see if it exceeds 200 files to send an alert?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-use-Splunk-to-check-a-directory-to-see-if-it-exceeds-200/m-p/347861#M63874</link>
      <description>&lt;P&gt;Thanks adonio,&lt;/P&gt;

&lt;P&gt;Got the scripting part, just not sure how to enter in Splunk and once entered in Splunk running a Search and Alerting.&lt;/P&gt;

&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jan 2018 17:21:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-use-Splunk-to-check-a-directory-to-see-if-it-exceeds-200/m-p/347861#M63874</guid>
      <dc:creator>Falcon1</dc:creator>
      <dc:date>2018-01-30T17:21:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Splunk to check a directory to see if it exceeds 200 files to send an alert?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-use-Splunk-to-check-a-directory-to-see-if-it-exceeds-200/m-p/347862#M63875</link>
      <description>&lt;P&gt;nice!&lt;BR /&gt;
can you share?&lt;BR /&gt;
here is a good explanation about setting up a scripted input&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/SplunkCloud/7.0.0/AdvancedDev/ScriptSetup"&gt;http://docs.splunk.com/Documentation/SplunkCloud/7.0.0/AdvancedDev/ScriptSetup&lt;/A&gt;&lt;BR /&gt;
for a live example, download the TA for nix (or another TA with scripted inputs)&lt;BR /&gt;
untar it and navigate to the /default/inputs.conf file&lt;BR /&gt;
open the file and see the references , example:&lt;BR /&gt;
    [script://./bin/vmstat.sh]&lt;BR /&gt;
    interval = 60&lt;BR /&gt;
    sourcetype = vmstat&lt;BR /&gt;
    source = vmstat&lt;BR /&gt;
    index = os&lt;BR /&gt;
    disabled = 1&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[script://./bin/iostat.sh]
interval = 60
sourcetype = iostat
source = iostat
index = os
disabled = 1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;navigate to /bin (in the app directory) to see the relevant scripts that are tied with the input&lt;/P&gt;

&lt;P&gt;hope it helps&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jan 2018 18:22:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-use-Splunk-to-check-a-directory-to-see-if-it-exceeds-200/m-p/347862#M63875</guid>
      <dc:creator>adonio</dc:creator>
      <dc:date>2018-01-30T18:22:21Z</dc:date>
    </item>
  </channel>
</rss>

