首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Splunk日志数据优化

Splunk日志数据优化
EN

Stack Overflow用户
提问于 2015-07-13 15:03:13
回答 1查看 266关注 0票数 1

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

任何帮助/想法都是很棒的。

EN

回答 1

Stack Overflow用户

发布于 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上阅读更多关于这方面的内容。以下是相关部分:

代码语言:javascript
复制
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.
票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/31377213

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档