<?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 Monitor Filename only in a directory. in Monitoring Splunk</title>
    <link>https://community.splunk.com/t5/Monitoring-Splunk/Monitor-Filename-only-in-a-directory/m-p/478706#M8348</link>
    <description>&lt;P&gt;Hi there,&lt;/P&gt;

&lt;P&gt;I have a folder on a UNC path and I would like for Splunk to simply index the filenames within the folder (the files are JPEGS). What would be the best way to do this? &lt;/P&gt;

&lt;P&gt;I am currently monitoring the folder as a data input however I'm seeing nothing indexed. Within the log files I am seeing the error:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; TailReader - Ignoring file '\\UNCPATH\FOLDER\PHOTO_NAME.jpg' due to: binary
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I'm not that familiar with the back-end of Splunk to make changes so I'd be grateful for any guidance. &lt;/P&gt;

&lt;P&gt;Thank you for your help! &lt;/P&gt;</description>
    <pubDate>Tue, 05 Nov 2019 11:35:09 GMT</pubDate>
    <dc:creator>danfinan</dc:creator>
    <dc:date>2019-11-05T11:35:09Z</dc:date>
    <item>
      <title>Monitor Filename only in a directory.</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Monitor-Filename-only-in-a-directory/m-p/478706#M8348</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;

&lt;P&gt;I have a folder on a UNC path and I would like for Splunk to simply index the filenames within the folder (the files are JPEGS). What would be the best way to do this? &lt;/P&gt;

&lt;P&gt;I am currently monitoring the folder as a data input however I'm seeing nothing indexed. Within the log files I am seeing the error:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; TailReader - Ignoring file '\\UNCPATH\FOLDER\PHOTO_NAME.jpg' due to: binary
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I'm not that familiar with the back-end of Splunk to make changes so I'd be grateful for any guidance. &lt;/P&gt;

&lt;P&gt;Thank you for your help! &lt;/P&gt;</description>
      <pubDate>Tue, 05 Nov 2019 11:35:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Monitor-Filename-only-in-a-directory/m-p/478706#M8348</guid>
      <dc:creator>danfinan</dc:creator>
      <dc:date>2019-11-05T11:35:09Z</dc:date>
    </item>
    <item>
      <title>Re: Monitor Filename only in a directory.</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Monitor-Filename-only-in-a-directory/m-p/478707#M8349</link>
      <description>&lt;P&gt;Hi danfinan,&lt;BR /&gt;
let me understand: do you want to monitor only the filenames? in other words, only the list of filenames eventually with file attributes (owner, dimension, etc...), is it correct?&lt;/P&gt;

&lt;P&gt;If this is your need, you could create a script that lists files (e.g. using the windows "dir" command) and capture outputs in Splunk.&lt;/P&gt;

&lt;P&gt;To do this, you have to create a script (called e.g. monitor_jpeg_files.bat) your TA ($SPLUNK_HOME/etc/apps/my_app/bin) containing the correct dir command &lt;CODE&gt;dir \\UNCPATH\FOLDER\*.jpg&lt;/CODE&gt; .&lt;BR /&gt;
And then create a stanza in inputs.conf of your TA like the following&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;###### Scripted Input to monitor jpeg files
[script://.\bin\monitor_jpeg_files.bat]
disabled = 0
## Run once per hour
interval = 3600
sourcetype = Script:jpef_files
index = my_index
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;After you deploy this TA on the target server and restart Splunk on Universal Forwarder, every hour you'll have the list of jpeg files in your directory.&lt;/P&gt;

&lt;P&gt;Ciao.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 02:52:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Monitor-Filename-only-in-a-directory/m-p/478707#M8349</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2020-09-30T02:52:34Z</dc:date>
    </item>
    <item>
      <title>Re: Monitor Filename only in a directory.</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Monitor-Filename-only-in-a-directory/m-p/478708#M8350</link>
      <description>&lt;P&gt;Hi Giuseppe, that worked perfectly, thank you very much sir! I'm very grateful for your help. Best wishes, Dan. &lt;/P&gt;</description>
      <pubDate>Tue, 05 Nov 2019 12:30:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Monitor-Filename-only-in-a-directory/m-p/478708#M8350</guid>
      <dc:creator>danfinan</dc:creator>
      <dc:date>2019-11-05T12:30:27Z</dc:date>
    </item>
    <item>
      <title>Re: Monitor Filename only in a directory.</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Monitor-Filename-only-in-a-directory/m-p/478709#M8351</link>
      <description>&lt;P&gt;Hi Dan,&lt;BR /&gt;
you're welcome.&lt;BR /&gt;
Ciao and next time!&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Tue, 05 Nov 2019 13:22:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Monitor-Filename-only-in-a-directory/m-p/478709#M8351</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2019-11-05T13:22:14Z</dc:date>
    </item>
    <item>
      <title>Re: Monitor Filename only in a directory.</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Monitor-Filename-only-in-a-directory/m-p/478710#M8352</link>
      <description>&lt;P&gt;Thanks for this answer.&lt;BR /&gt;
I have been looking for something similar. &lt;/P&gt;</description>
      <pubDate>Tue, 05 Nov 2019 19:31:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Monitor-Filename-only-in-a-directory/m-p/478710#M8352</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-11-05T19:31:05Z</dc:date>
    </item>
    <item>
      <title>Re: Monitor Filename only in a directory.</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Monitor-Filename-only-in-a-directory/m-p/478711#M8353</link>
      <description>&lt;P&gt;Hi Giuseppe, thanks again for your answer. I have a follow up question if you do not mind?&lt;/P&gt;

&lt;P&gt;Splunk is indexing the data once per hour however it is duplicating the data. In 24hrs I now have the duplicate events in there 24 times. Is there a way to stop this from happening do you know? &lt;/P&gt;

&lt;P&gt;Thanks for your help! &lt;/P&gt;</description>
      <pubDate>Thu, 07 Nov 2019 09:36:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Monitor-Filename-only-in-a-directory/m-p/478711#M8353</guid>
      <dc:creator>danfinan</dc:creator>
      <dc:date>2019-11-07T09:36:11Z</dc:date>
    </item>
    <item>
      <title>Re: Monitor Filename only in a directory.</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Monitor-Filename-only-in-a-directory/m-p/478712#M8354</link>
      <description>&lt;P&gt;Hi Dan,&lt;BR /&gt;
I fear that it is not possible to do otherwise: I found myself having to do something similar and I didn't find anything.&lt;BR /&gt;
You have to manage duplicates at search time.&lt;/P&gt;

&lt;P&gt;Ciao.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Thu, 07 Nov 2019 10:35:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Monitor-Filename-only-in-a-directory/m-p/478712#M8354</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2019-11-07T10:35:37Z</dc:date>
    </item>
    <item>
      <title>Re: Monitor Filename only in a directory.</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Monitor-Filename-only-in-a-directory/m-p/478713#M8355</link>
      <description>&lt;P&gt;I can suggest a work around.&lt;/P&gt;

&lt;P&gt;Schedule the script with cron and save the output of the script to a file and monitor that file in Splunk.&lt;BR /&gt;
So whenever the script is executed, it will create the file.&lt;/P&gt;

&lt;P&gt;It will not totally stop the duplicates but,&lt;BR /&gt;
- in case there is no updates in the file names, than the same files names will not be indexed multiple times.&lt;BR /&gt;
- file names will be listed in alphabetic order, so if any file is renamed / removed / added than only it will reindex the entire file.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Nov 2019 11:56:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Monitor-Filename-only-in-a-directory/m-p/478713#M8355</guid>
      <dc:creator>gaurav_maniar</dc:creator>
      <dc:date>2019-11-07T11:56:11Z</dc:date>
    </item>
  </channel>
</rss>

