Getting Data In

Support for logs compressed with xz?

hatchmt
Engager

The version of SUSE Linux I'm using has been compressing my logs with xz (by default) rather than gzip or bzip2. As such, when I added the log directory into splunk, there's a large gap where those files couldn't be parsed.

I can go through and unxz all of the logs and use bzip2 to compress them, and change logrotate to use bzip2 instead of xz, but I do like that xz achieves higher compression ratios than bzip2. I'm assuming that the decompression algorithms supported by splunk are hard-coded, but I thought I'd ask if it's something I can modify on my end to add support for that file type.

If not, is this something that is being considered for a future release?

juanlazarosanch
New Member

Hatchmt, were you able to read xz files? If so, what steps did you follow? Thanks!

0 Karma

ichaer_splunk
Splunk Employee
Splunk Employee

You can enable any sort of decompression setting the unarchive_cmd configuration in props.conf for your input. If you want to pick xz files by default, something like this should work:

[source::.../*.xz]
unarchive_cmd = /usr/bin/xz -cd -

If you already have a specific stanza in props.conf for that particular source, you'll need to tweak it.

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...