对不起Splunk的新用户...我的单个日志文件的条目如下:
" 15/11/2017 20:20:59"," 0"," 1803.xml","复制到Amazon S3&# 34,5" O" " 15/11/2017 20:21:00"," 0"," 1260.xml","复制到Amazon S3", 5," O" " 15/11/2017 20:21:00"," 0"," 2415.xml","复制到Amazon S3", 5," O" " 15/11/2017 20:21:01"," 0"," 134.xml","复制到Amazon S3", 5," O" " 15/11/2017 20:21:01"," 0"," 808.xml","复制到Amazon S3", 5," O" " 15/11/2017 20:21:02"," 0"," 261.xml","复制到Amazon S3", 5," O" " 15/11/2017 20:21:02"," 0"," 646.xml","复制到Amazon S3", 5," O" " 15/11/2017 20:21:03"," 0"," 1157.xml","复制到Amazon S3", 5," O"
Splunk通过时间戳(字段1)将其分解为事件,但由于上述条目具有重复的时间戳,因此我只获得每个日期的第一个事件。
我如何确保EACH系列获得自己的活动?
答案 0 :(得分:0)
我必须用
创建一个新的sourcetype
1. SHOULD_LINEMERGE = false
2删除了BREAK_ONLY_BEFORE属性
并将数据源指向此
答案 1 :(得分:0)
在Splunk专业服务领域,我们将这些称为“基本配置”,这些应该应用于所有新的数据源。您将基本配置与源类型联系起来,因此下面您将使用源类型替换my_sourcetype。
在大多数情况下,应将SHOULD_LINEMERGE设置为false,并且应使用line_breaker而不是break_only_before。如果您在小型环境中,当前设置可能可以正常工作,但是当您开始扩展时,您的索引器将会超载。
在您的索引器上props.conf
上应用这些
[my_sourcetype]
TIME_PREFIX = \"
MAX_TIMESTAMP_LOOKAHEAD = 25
TIME_FORMAT = %d/%m/%Y %H:%M:%S
LINE_BREAKER = ([\r\n])\"\d+\/\d+\/\d+\s\d+:\d+:\d+\"
SHOULD_LINEMERGE = False
TRUNCATE = 10000