<?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: Index gzipped files without .gz extension in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Index-gzipped-files-without-gz-extension/m-p/490843#M83897</link>
    <description>&lt;P&gt;This is the props that worked for&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; [source::D:\\path\\to\log\\*]
 #Default
 #unarchive_cmd = _auto
 #On linux
 #unarchive_cmd = gzip -cd -
 #On windows
 unarchive_cmd = splunk-compresstool -g
 invalid_cause = archive
 NO_BINARY_CHECK = true
 is_valid = False
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 19 Nov 2019 05:45:21 GMT</pubDate>
    <dc:creator>chris</dc:creator>
    <dc:date>2019-11-19T05:45:21Z</dc:date>
    <item>
      <title>Index gzipped files without .gz extension</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Index-gzipped-files-without-gz-extension/m-p/490841#M83895</link>
      <description>&lt;P&gt;Hi, &lt;/P&gt;

&lt;P&gt;I am trying to index  gzipped files that do not have the .gz extension on a window universal forwarder.&lt;/P&gt;

&lt;P&gt;First I got the following messages in splunkd.log:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;11-18-2019 15:06:33.698 +0100 INFO  TailReader - Ignoring file 'D:\path\to\log\messages_xyz' due to: binary
11-18-2019 15:06:33.698 +0100 WARN FileClassifierManager - The file 'D:\path\to\log\messages_xyz' is invalid. Reason: binary.
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Looking at how splunk handles gzipped files in props.conf of system/default I tried to put the following props.conf together&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[mysourcetype]
invalid_cause = archive
NO_BINARY_CHECK = true
is_valid = False

[source::D:\path\to\log\*]
#Default
#unarchive_cmd = _auto
#On linux
#unarchive_cmd = gzip -cd -
#On windows
unarchive_cmd = splunk-compresstool -g
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;trying  out splunk-compresstool seems to work:&lt;BR /&gt;
.\splunk-compresstool.exe -g 'xyz'&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;2019-03-27 16:01:34.000 device kern.info kernel: udevd version 124 started
2019-03-27 16:01:34.000 device kern.info kernel: net eth0: eth0: allmulti set
2019-03-27 16:01:34.000 device kern.info kernel: net eth0: eth0: allmulti set
2019-03-27 16:06:44.000 devicekern.warn kernel: JFFS2 warning: (793) jffs2_sum_write_data: Not enough space for summary, padsize = -376
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This is what I see in splunkd.log&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;11-18-2019 16:55:47.351 +0100 INFO  ArchiveProcessor - Handling file=xyz
11-18-2019 16:55:47.351 +0100 INFO  ArchiveProcessor - reading path=xyz (seek=0 len=211534)
11-18-2019 16:55:47.402 +0100 INFO  ArchiveProcessor - Finished processing file 'xyz', removing from stats
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And this is what I see in metrics.log&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;11-18-2019 17:03:47.471 +0100 INFO  Metrics - group=per_source_thruput, ingest_pipe=0, series="xyz", kbps=0, eps=0.03224797474898443, kb=0, ev=1, avg_age=0, max_age=0
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Although metrics.log says that ev=1 I do not see any events in the index (and there should be more than 1 event per file)&lt;/P&gt;

&lt;P&gt;Is there a possibility to see what the ArchiveProcessor is doing?&lt;/P&gt;

&lt;P&gt;Shouldn't Splunk just recognize filetypes without depending on the extension?&lt;/P&gt;

&lt;P&gt;Regards Chris&lt;/P&gt;</description>
      <pubDate>Mon, 18 Nov 2019 16:29:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Index-gzipped-files-without-gz-extension/m-p/490841#M83895</guid>
      <dc:creator>chris</dc:creator>
      <dc:date>2019-11-18T16:29:13Z</dc:date>
    </item>
    <item>
      <title>Re: Index gzipped files without .gz extension</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Index-gzipped-files-without-gz-extension/m-p/490842#M83896</link>
      <description>&lt;P&gt;Turns out that i forgot to escape the \ in the win path in props.conf&lt;/P&gt;</description>
      <pubDate>Mon, 18 Nov 2019 16:35:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Index-gzipped-files-without-gz-extension/m-p/490842#M83896</guid>
      <dc:creator>chris</dc:creator>
      <dc:date>2019-11-18T16:35:04Z</dc:date>
    </item>
    <item>
      <title>Re: Index gzipped files without .gz extension</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Index-gzipped-files-without-gz-extension/m-p/490843#M83897</link>
      <description>&lt;P&gt;This is the props that worked for&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; [source::D:\\path\\to\log\\*]
 #Default
 #unarchive_cmd = _auto
 #On linux
 #unarchive_cmd = gzip -cd -
 #On windows
 unarchive_cmd = splunk-compresstool -g
 invalid_cause = archive
 NO_BINARY_CHECK = true
 is_valid = False
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 19 Nov 2019 05:45:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Index-gzipped-files-without-gz-extension/m-p/490843#M83897</guid>
      <dc:creator>chris</dc:creator>
      <dc:date>2019-11-19T05:45:21Z</dc:date>
    </item>
    <item>
      <title>Re: Index gzipped files without .gz extension</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Index-gzipped-files-without-gz-extension/m-p/583879#M102820</link>
      <description>&lt;P&gt;Thanks so much for your post.&amp;nbsp; I am surprised that the following did not work.&amp;nbsp; "_auto" is not the default value meaning setting it&amp;nbsp; "_auto" would make Splunk automatically extract the archived file unless a file extension is required.&amp;nbsp; I am having a case where Splunk is ingesting gzip file without extension but the files after ingestion is not in text format.&amp;nbsp; After testing a file with .gz Splunk recognized it and decompressed it properly.&amp;nbsp; That tells me that Splunk requires an archived file to have an extension.&lt;/P&gt;&lt;PRE&gt;unarchive_cmd = _auto&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 06 Feb 2022 19:54:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Index-gzipped-files-without-gz-extension/m-p/583879#M102820</guid>
      <dc:creator>anwarmian</dc:creator>
      <dc:date>2022-02-06T19:54:08Z</dc:date>
    </item>
  </channel>
</rss>

