<?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: Monitor log file inside zip file in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Monitor-log-file-inside-zip-file/m-p/672645#M230362</link>
    <description>&lt;P&gt;Splunk cannot monitor a single file within a zip file.&amp;nbsp; You must monitor the entire zip file or have a script extract the desired file into a monitored location.&lt;/P&gt;</description>
    <pubDate>Sat, 23 Dec 2023 21:18:11 GMT</pubDate>
    <dc:creator>richgalloway</dc:creator>
    <dc:date>2023-12-23T21:18:11Z</dc:date>
    <item>
      <title>Monitor log file inside zip file</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Monitor-log-file-inside-zip-file/m-p/672644#M230361</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There are 50 zip files in a folder in those zip folders there are many other files- log/txt/png, out of which I want to monitor a specific log file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below is the code i have written but it is failing to monitor that log file, please suggest.&lt;/P&gt;&lt;P&gt;[monitor:///home/splunk/*.zip:./WalkbackDetails.log]&lt;BR /&gt;disabled = false&lt;BR /&gt;index = ziptest&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 23 Dec 2023 19:11:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Monitor-log-file-inside-zip-file/m-p/672644#M230361</guid>
      <dc:creator>krutika_ag</dc:creator>
      <dc:date>2023-12-23T19:11:25Z</dc:date>
    </item>
    <item>
      <title>Re: Monitor log file inside zip file</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Monitor-log-file-inside-zip-file/m-p/672645#M230362</link>
      <description>&lt;P&gt;Splunk cannot monitor a single file within a zip file.&amp;nbsp; You must monitor the entire zip file or have a script extract the desired file into a monitored location.&lt;/P&gt;</description>
      <pubDate>Sat, 23 Dec 2023 21:18:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Monitor-log-file-inside-zip-file/m-p/672645#M230362</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2023-12-23T21:18:11Z</dc:date>
    </item>
    <item>
      <title>Re: Monitor log file inside zip file</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Monitor-log-file-inside-zip-file/m-p/672649#M230364</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/262703"&gt;@krutika_ag&lt;/a&gt;&amp;nbsp;... what&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/213957"&gt;@richgalloway&lt;/a&gt;&amp;nbsp;said was an excellent answer.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;For Splunk newbies, let me rephrase it(the url link for your ref -&amp;nbsp; &lt;A href="https://docs.splunk.com/Documentation/Splunk/9.1.2/Data/Monitorfilesanddirectories" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/9.1.2/Data/Monitorfilesanddirectories&lt;/A&gt;) as follows:&lt;/P&gt;&lt;H3&gt;&lt;SPAN class=""&gt;How the forwarder monitors archive files&lt;/SPAN&gt;&lt;/H3&gt;&lt;P&gt;In order to monitor archived files, forwarders decompress archive files, such as a TAR or ZIP file, prior to processing.&lt;BR /&gt;&lt;BR /&gt;Splunk then processes these files in a "single threaded format" (there are pros and cons, but that is a different topic).&lt;BR /&gt;&lt;BR /&gt;The following types of archive files are supported:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;DIV class=""&gt;TAR&lt;/DIV&gt;&lt;/LI&gt;&lt;LI&gt;&lt;DIV class=""&gt;GZ&lt;/DIV&gt;&lt;/LI&gt;&lt;LI&gt;&lt;DIV class=""&gt;BZ2&lt;/DIV&gt;&lt;/LI&gt;&lt;LI&gt;&lt;DIV class=""&gt;TAR.GZ and TGZ&lt;/DIV&gt;&lt;/LI&gt;&lt;LI&gt;&lt;DIV class=""&gt;TBZ and TBZ2&lt;/DIV&gt;&lt;/LI&gt;&lt;LI&gt;&lt;DIV class=""&gt;ZIP&lt;/DIV&gt;&lt;/LI&gt;&lt;LI&gt;&lt;DIV class=""&gt;Z&lt;/DIV&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;If you add new data to an existing archive file, the forwarder reprocesses the entire file rather than just the new data. This can result in event duplication.&lt;/P&gt;&lt;P&gt;so, to avoid duplication, you should monitor the whole archive file.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Lets say if these files are small, then you can monitor the whole archive and the license usage may not be impacted so much (the search time vs index time... should be considered clearly and well planned for this task).&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;One more thing to consider:&lt;BR /&gt;are you using UF or HF&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;--- or both&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;---- or neither(you may directly upload thru SH GUI) - Splunk Support does not support this deployment model)&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;hope this helped some new Splunkers, thanks.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 24 Dec 2023 17:40:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Monitor-log-file-inside-zip-file/m-p/672649#M230364</guid>
      <dc:creator>inventsekar</dc:creator>
      <dc:date>2023-12-24T17:40:25Z</dc:date>
    </item>
    <item>
      <title>Re: Monitor log file inside zip file</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Monitor-log-file-inside-zip-file/m-p/672716#M230379</link>
      <description>&lt;P&gt;Thank You for your reply, I am using both UF and HF&lt;/P&gt;</description>
      <pubDate>Wed, 27 Dec 2023 09:19:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Monitor-log-file-inside-zip-file/m-p/672716#M230379</guid>
      <dc:creator>krutika_ag</dc:creator>
      <dc:date>2023-12-27T09:19:18Z</dc:date>
    </item>
    <item>
      <title>Re: Monitor log file inside zip file</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Monitor-log-file-inside-zip-file/m-p/672964#M230465</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/262703"&gt;@krutika_ag&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As per Splunk docs:&amp;nbsp;&lt;SPAN&gt;If you add new data to an existing archive file, the forwarder reprocesses the entire file rather than just the new data. This can result in event duplication.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;thus, to avoid duplication, Splunk monitors whole archive files and does not support single file monitoring.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;so, you/we can not monitor a single file inside an archive.&amp;nbsp;&lt;/P&gt;&lt;P&gt;what i would like to suggest you is that, you can ask the developers/app team who creates that archive file to put it in a separate archive file everytime when there is an update to the archive file.&amp;nbsp;&lt;/P&gt;&lt;P&gt;i am still not much sure of this suggestion, but this should be possible as per my understanding, thanks.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jan 2024 23:48:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Monitor-log-file-inside-zip-file/m-p/672964#M230465</guid>
      <dc:creator>inventsekar</dc:creator>
      <dc:date>2024-01-01T23:48:35Z</dc:date>
    </item>
  </channel>
</rss>

