<?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 does Splunk handle gzip'd logs? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-does-Splunk-handle-gzip-d-logs/m-p/698151#M115758</link>
    <description>&lt;P&gt;The gzip'd files are index under their own source names.&amp;nbsp; They come in the query because their names match the pattern &lt;FONT face="courier new,courier"&gt;source="/var/log/nginx/access.log*"&lt;/FONT&gt;.&amp;nbsp; Remove the asterisk and only the one file will appear.&lt;/P&gt;</description>
    <pubDate>Wed, 04 Sep 2024 00:25:31 GMT</pubDate>
    <dc:creator>richgalloway</dc:creator>
    <dc:date>2024-09-04T00:25:31Z</dc:date>
    <item>
      <title>How does Splunk handle gzip'd logs?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-does-Splunk-handle-gzip-d-logs/m-p/698147#M115757</link>
      <description>&lt;P&gt;Suppose I have `/var/log/nginx/access.log` and then a dozen files in the same directory named like `access.log-&amp;lt;date&amp;gt;.gz`. When Splunk processes the gzip'd files, is it supposed to index them under the `/var/log/nginx/access.log` source? I ask because I've noticed that these gzip files show up when I query:&lt;BR /&gt;&lt;BR /&gt;```&lt;BR /&gt;source="/var/log/nginx/access.log*" | stats count by source&lt;BR /&gt;```&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'd appreciate a link to docs regarding this, I couldn't find any. Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 03 Sep 2024 22:36:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-does-Splunk-handle-gzip-d-logs/m-p/698147#M115757</guid>
      <dc:creator>jm_tesla</dc:creator>
      <dc:date>2024-09-03T22:36:22Z</dc:date>
    </item>
    <item>
      <title>Re: How does Splunk handle gzip'd logs?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-does-Splunk-handle-gzip-d-logs/m-p/698151#M115758</link>
      <description>&lt;P&gt;The gzip'd files are index under their own source names.&amp;nbsp; They come in the query because their names match the pattern &lt;FONT face="courier new,courier"&gt;source="/var/log/nginx/access.log*"&lt;/FONT&gt;.&amp;nbsp; Remove the asterisk and only the one file will appear.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Sep 2024 00:25:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-does-Splunk-handle-gzip-d-logs/m-p/698151#M115758</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2024-09-04T00:25:31Z</dc:date>
    </item>
    <item>
      <title>Re: How does Splunk handle gzip'd logs?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-does-Splunk-handle-gzip-d-logs/m-p/698153#M115759</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/271759"&gt;@jm_tesla&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For easy understanding, lets say there are 2 files&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;/var/log/nginx/access.log and&amp;nbsp;/var/log/nginx/access1.log&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Inside a gzip file. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;When you onboard this gzip'd log to Splunk, the Splunk engine will undo the gzip and read both files and assign&amp;nbsp;&lt;BR /&gt;source for first file as "/var/log/nginx/access.log"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;source for the 2nd file as "/var/log/nginx/access1.log"&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;from the documentation -&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/Splunk/9.3.0/Data/Monitorfilesanddirectories" target="_blank" rel="noopener"&gt;https://docs.splunk.com/Documentation/Splunk/9.3.0/Data/Monitorfilesanddirectories&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;other than gzip, these are supported:&lt;/SPAN&gt;&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;BR /&gt;&lt;BR /&gt;Best Regards, Sekar&lt;/DIV&gt;&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Wed, 04 Sep 2024 00:44:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-does-Splunk-handle-gzip-d-logs/m-p/698153#M115759</guid>
      <dc:creator>inventsekar</dc:creator>
      <dc:date>2024-09-04T00:44:09Z</dc:date>
    </item>
    <item>
      <title>Re: How does Splunk handle gzip'd logs?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-does-Splunk-handle-gzip-d-logs/m-p/698157#M115760</link>
      <description>&lt;P&gt;Thanks, and that makes sense. I was hoping (expecting, honestly) that Splunk would realize that the gzip'd log files "were really just `access.log` at a previous time".&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;It's good to have clarity!&lt;/P&gt;</description>
      <pubDate>Wed, 04 Sep 2024 01:17:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-does-Splunk-handle-gzip-d-logs/m-p/698157#M115760</guid>
      <dc:creator>jm_tesla</dc:creator>
      <dc:date>2024-09-04T01:17:36Z</dc:date>
    </item>
    <item>
      <title>Re: How does Splunk handle gzip'd logs?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-does-Splunk-handle-gzip-d-logs/m-p/698158#M115761</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/271759"&gt;@jm_tesla&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&amp;gt;&lt;SPAN&gt;the gzip'd log files "were really just `access.log` at a previous time".&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;yes, you are right actually.&amp;nbsp;&lt;/P&gt;&lt;P&gt;"the previous time" will be file's last modification time.. that will become the&lt;STRONG&gt;&amp;nbsp;"_time"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Each file's name will be assigned to the field &lt;STRONG&gt;"source"&lt;BR /&gt;&lt;/STRONG&gt;the sourcetype will be just the "filename" (gzip will be removed)&lt;/P&gt;&lt;P&gt;the source will be filename.gzip\filename1.txt and&amp;nbsp;filename.gzip\filename2.txt (i just verified this, on Splunk 9.3.0)&lt;BR /&gt;&lt;BR /&gt;if you got your answers, can you pls mark this post as resolved (so that it will move from unanswered to answered and i will get a solution authored as well &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt; .. thanks)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Best Regards&lt;/P&gt;&lt;P&gt;Sekar&lt;/P&gt;</description>
      <pubDate>Wed, 04 Sep 2024 01:49:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-does-Splunk-handle-gzip-d-logs/m-p/698158#M115761</guid>
      <dc:creator>inventsekar</dc:creator>
      <dc:date>2024-09-04T01:49:37Z</dc:date>
    </item>
    <item>
      <title>Re: How does Splunk handle gzip'd logs?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-does-Splunk-handle-gzip-d-logs/m-p/698330#M115781</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/271759"&gt;@jm_tesla&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;May i know if you have further questions?.. if no then, could you pls mark this post as resolved (so that it will move from unanswered to answered and i will get a solution authored as well&amp;nbsp;thanks)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Best Regards&lt;/P&gt;&lt;P&gt;Sekar&lt;/P&gt;</description>
      <pubDate>Thu, 05 Sep 2024 19:42:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-does-Splunk-handle-gzip-d-logs/m-p/698330#M115781</guid>
      <dc:creator>inventsekar</dc:creator>
      <dc:date>2024-09-05T19:42:41Z</dc:date>
    </item>
  </channel>
</rss>

