2015-07-13 52 views
1

我是Splunk的新手,我希望优化日志数据文件(做无损压缩),我将添加到splunk中。由于数据必须是文本(不是二进制或任何其他格式),我不能去huffman编码等,并不知道从哪里开始。Splunk日志数据优化

任何帮助/想法都会很棒。

回答

3

根据Monitor files and directories

Splunk的企业解压缩归档文件它索引他们。它可以处理这些常见的归档文件类型:tar,gz,bz2,tar.gz,tgz,tbz,tbz2,zip和z。

我建议使用任何上述压缩方法,然后配置Splunk以使用UI或props.conf通过文件名或目录规范来监视文件。如果由于某种原因需要使用不同的压缩算法,则可以这样做,然后指示Splunk在索引管道期间使用特殊的unarchive_cmd。您可以通过查看props.conf.spec来了解更多信息。以下是相关部分:

unarchive_cmd = <string> 
* Only called if invalid_cause is set to "archive". 
* This field is only valid on [source::<source>] stanzas. 
* <string> specifies the shell command to run to extract an archived source. 
* Must be a shell command that takes input on stdin and produces output on stdout. 
* Use _auto for Splunk's automatic handling of archive files (tar, tar.gz, tgz, tbz, tbz2, zip) 
* This setting applies at input time, when data is first read by Splunk. 
    The setting is used on a Splunk system that has configured inputs acquiring the data. 
* Defaults to empty.