<?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 directory containing zip files in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Monitor-directory-containing-zip-files/m-p/87145#M18082</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I'm trying to monitor a directory which contains zip files. The zip files contain different file types, and I'm only interested in indexing the txt files.&lt;BR /&gt;
My path would be something like: dir\something.zip\file.txt&lt;/P&gt;

&lt;P&gt;I have tried some different monitor approaches, but either nothing gets indexed or all of the files in my zip file are indexed. Here are a few examples of what I have tried in inputs.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[monitor://C:\Users\angeliga\Filer\...]
disabled = false
followTail = 0
sourcetype = my_type
whitelist=*.txt

[monitor://C:\Users\angeliga\Filer\...\*.txt]
disabled = false
followTail = 0
sourcetype = my_type
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Does anybody have any idea of what I'm doing wrong?&lt;BR /&gt;
Thanks!&lt;/P&gt;</description>
    <pubDate>Mon, 08 Jul 2013 09:10:00 GMT</pubDate>
    <dc:creator>gelica</dc:creator>
    <dc:date>2013-07-08T09:10:00Z</dc:date>
    <item>
      <title>Monitor directory containing zip files</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Monitor-directory-containing-zip-files/m-p/87145#M18082</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I'm trying to monitor a directory which contains zip files. The zip files contain different file types, and I'm only interested in indexing the txt files.&lt;BR /&gt;
My path would be something like: dir\something.zip\file.txt&lt;/P&gt;

&lt;P&gt;I have tried some different monitor approaches, but either nothing gets indexed or all of the files in my zip file are indexed. Here are a few examples of what I have tried in inputs.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[monitor://C:\Users\angeliga\Filer\...]
disabled = false
followTail = 0
sourcetype = my_type
whitelist=*.txt

[monitor://C:\Users\angeliga\Filer\...\*.txt]
disabled = false
followTail = 0
sourcetype = my_type
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Does anybody have any idea of what I'm doing wrong?&lt;BR /&gt;
Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jul 2013 09:10:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Monitor-directory-containing-zip-files/m-p/87145#M18082</guid>
      <dc:creator>gelica</dc:creator>
      <dc:date>2013-07-08T09:10:00Z</dc:date>
    </item>
    <item>
      <title>Re: Monitor directory containing zip files</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Monitor-directory-containing-zip-files/m-p/87146#M18083</link>
      <description>&lt;P&gt;First let me stress I have not done this, and I am not even completely confident of the file syntax, but I suspect the path you want is something along the lines of:&lt;/P&gt;

&lt;P&gt;$SPLUNK_HOME/etc/system/local/inputs.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[monitor://C:\Users\angeliga\Filer\...]
disabled = false
whitelist=*.txt
followTail = 0
sourcetype = my_type
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;$SPLUNK_HOME/etc/system/local/props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[source:://C:\Users\angeliga\Filer\...]
TRANSFORMS-set=droprecord,userecord
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;$SPLUNK_HOME/etc/system/local/transforms.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[droprecord]
REGEX=.
DEST_KEY=queue
FORMAT=nullQueue

[userecord]
REGEX={targetmatch}
DEST_KEY=queue
FORMAT=indexQueue
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This assumes that rather than targetting the .txt files within the .zip file, you have a record structure you can target for the "userecord" regex.  Certainly, if I were to investigate this is where I would begin, but I could be entirely and utterly wrong.  It is at best an educated guess.&lt;/P&gt;

&lt;P&gt;I will be watching with interest to see if there is, in fact, a direct solution to what you want to do.&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jul 2013 20:44:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Monitor-directory-containing-zip-files/m-p/87146#M18083</guid>
      <dc:creator>grijhwani</dc:creator>
      <dc:date>2013-07-08T20:44:37Z</dc:date>
    </item>
    <item>
      <title>Re: Monitor directory containing zip files</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Monitor-directory-containing-zip-files/m-p/87147#M18084</link>
      <description>&lt;P&gt;Thanks for your suggestion, I will try it and hope it works. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;But I wonder if this means that the all of the files gets indexed at first and the the unwanted files gets sorted out? Or will this in fact only index the files that I  want?&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jul 2013 05:21:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Monitor-directory-containing-zip-files/m-p/87147#M18084</guid>
      <dc:creator>gelica</dc:creator>
      <dc:date>2013-07-09T05:21:40Z</dc:date>
    </item>
    <item>
      <title>Re: Monitor directory containing zip files</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Monitor-directory-containing-zip-files/m-p/87148#M18085</link>
      <description>&lt;P&gt;I appreciate your help, but unfortnuately, I didn't get it to work.. &lt;/P&gt;

&lt;P&gt;I tried some different options, including setting my "keep-regex" to a specific file name that is in the compressed file. I also tried excluding the whitelist parameter, or sending both droprecord and userecord to nullQueue. &lt;/P&gt;

&lt;P&gt;I still get non-txt files indexed, it seems like Splunk doesn't like this approach, and maybe I have to extract the zip files beforehand.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jul 2013 07:35:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Monitor-directory-containing-zip-files/m-p/87148#M18085</guid>
      <dc:creator>gelica</dc:creator>
      <dc:date>2013-07-09T07:35:33Z</dc:date>
    </item>
    <item>
      <title>Re: Monitor directory containing zip files</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Monitor-directory-containing-zip-files/m-p/87149#M18086</link>
      <description>&lt;P&gt;I think you're missing the point.  The regex is a pattern match to to target the format of the records within the text files, not the text file names.  I am assuming that the text files follow some regular format.&lt;/P&gt;

&lt;P&gt;The regex matching means that yes the files get processed, but only the matching records will actually be indexed.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jul 2013 10:19:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Monitor-directory-containing-zip-files/m-p/87149#M18086</guid>
      <dc:creator>grijhwani</dc:creator>
      <dc:date>2013-07-09T10:19:26Z</dc:date>
    </item>
    <item>
      <title>Re: Monitor directory containing zip files</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Monitor-directory-containing-zip-files/m-p/87150#M18087</link>
      <description>&lt;P&gt;&lt;IMG src="https://community.splunk.com/storage/temp/174207-vm.jpg" alt="alt text" /&gt;&lt;/P&gt;

&lt;P&gt;splunkd.log&lt;/P&gt;

&lt;P&gt;my &lt;STRONG&gt;inputs.conf&lt;/STRONG&gt;&lt;BR /&gt;
[monitor:///home/administrator/Pictures]&lt;BR /&gt;
disabled = false&lt;BR /&gt;
host = pgwlogs&lt;BR /&gt;
index = pgw_logsource&lt;BR /&gt;
sourcetype = pgw&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;./splunk list monitor&lt;/STRONG&gt;&lt;BR /&gt;
$SPLUNK_HOME/var/spool/splunk/...stash_new&lt;BR /&gt;
    /home/administrator/Pictures/&lt;BR /&gt;
        /home/administrator/Pictures/OK_USCDB_1_20161108050001.tar.gz&lt;BR /&gt;
Monitored Files:&lt;BR /&gt;
    $SPLUNK_HOME/etc/splunk.version&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 11:48:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Monitor-directory-containing-zip-files/m-p/87150#M18087</guid>
      <dc:creator>dantimola</dc:creator>
      <dc:date>2020-09-29T11:48:31Z</dc:date>
    </item>
    <item>
      <title>Re: Monitor directory containing zip files</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Monitor-directory-containing-zip-files/m-p/87151#M18088</link>
      <description>&lt;P&gt;Yes thats right, some cases we write regex for hostnames that again scans the records and assign the host name to the events&lt;/P&gt;</description>
      <pubDate>Wed, 04 Sep 2019 11:48:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Monitor-directory-containing-zip-files/m-p/87151#M18088</guid>
      <dc:creator>arunsundarm</dc:creator>
      <dc:date>2019-09-04T11:48:54Z</dc:date>
    </item>
  </channel>
</rss>

