我是splunk的新手,我希望优化日志数据文件(做无损压缩),我将添加到Splunk。由于数据必须是文本的(不是二进制或任何其他格式),我不能进行霍夫曼编码等,也不知道从哪里开始。
任何帮助/想法都是很棒的。
发布于 2015-07-18 04:29:58
根据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.https://stackoverflow.com/questions/31377213
复制相似问题