【问题标题】:Splunk log data optimizationSplunk 日志数据优化
【发布时间】:2015-07-13 07:03:13
【问题描述】:

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

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

【问题讨论】:

    标签: splunk lossless-compression


    【解决方案1】:

    根据Monitor files and directories

    Splunk Enterprise 在对归档文件编制索引之前对其进行解压缩。它可以处理这些常见的归档文件类型:tar、gz、bz2、tar.gz、tgz、tbz、tbz2、zip 和 z。

    我建议使用上述任何一种压缩方法,然后使用 UI 或 props.conf 将 Splunk 配置为按文件名或目录规范监控文件。如果出于某种原因您需要使用不同的压缩算法,您可以这样做,然后指示 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.
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2022-01-18
      • 1970-01-01
      • 1970-01-01
      • 2017-01-01
      • 1970-01-01
      • 2022-11-19
      • 2021-10-26
      • 1970-01-01
      相关资源
      最近更新 更多