首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Heka每15秒写一次调试输出文件?

Heka每15秒写一次调试输出文件?
EN

Stack Overflow用户
提问于 2016-01-05 09:04:28
回答 1查看 274关注 0票数 0

我试图找出Heka的配置,并做了这样一个测试配置:

代码语言:javascript
复制
[hekad]
maxprocs = 4

[Dashboard]
type = "DashboardOutput"
address = ":4352"
ticker_interval = 15

[testfile]
type = "LogstreamerInput"
log_directory = "/tmp"
file_match = 'test\.log'

[filewriter]
type = "FileOutput"
path = "/tmp/output.log"
perm = "666"
message_matcher = "TRUE"
encoder = "PayloadEncoder"

[PayloadEncoder]
append_newlines = false
prefix_ts = true
ts_from_message = false

接下来,我使用while true; do date >> /tmp/test.log ; sleep 1; done编写日志,我希望/tmp/output.log会被填充相同的信息,但是无论test.log是否被写入,输出日志都会填充以下信息:

代码语言:javascript
复制
[2016/Jan/05:11:01:51 +0200] [2016/Jan/05:11:02:06 +0200] {"encoders":[{"Name":"filewriter-PayloadEncoder"}],"globals":[{"InChanCapacity":{"representation":"count","value":100},"InChanLength":{"representation":"count","value":100},"Name":"inputRecycleChan"},{"InChanCapacity":{"representation":"count","value":100},"InChanLength":{"representation":"count","value":100},"Name":"injectRecycleChan"},{"InChanCapacity":{"representation":"count","value":30},"InChanLength":{"representation":"count","value":0},"Name":"Router","ProcessMessageCount":{"representation":"count","value":260}}],"inputs":[{"Name":"testfile","testfile-bytes":{"representation":"count","value":84419},"testfile-filename":{"representation":"","value":"/tmp/test.log"}}],"outputs":[{"InChanCapacity":{"representation":"count","value":30},"InChanLength":{"representation":"count","value":0},"LeakCount":{"representation":"count","value":0},"MatchAvgDuration":{"representation":"ns","value":1506},"MatchChanCapacity":{"representation":"count","value":30},"MatchChanLength":{"representation":"count","value":0},"Name":"Dashboard"},{"InChanCapacity":{"representation":"count","value":30},"InChanLength":{"representation":"count","value":0},"LeakCount":{"representation":"count","value":0},"MatchAvgDuration":{"representation":"ns","value":550},"MatchChanCapacity":{"representation":"count","value":30},"MatchChanLength":{"representation":"count","value":0},"Name":"filewriter"}],"splitters":[{"Name":"testfile-TokenSplitter-1"}]}
[2016/Jan/05:11:02:06 +0200] [2016/Jan/05:11:02:21 +0200] {"encoders":[{"Name":"filewriter-PayloadEncoder"}],"globals":[{"InChanCapacity":{"representation":"count","value":100},"InChanLength":{"representation":"count","value":100},"Name":"inputRecycleChan"},{"InChanCapacity":{"representation":"count","value":100},"InChanLength":{"representation":"count","value":100},"Name":"injectRecycleChan"},{"InChanCapacity":{"representation":"count","value":30},"InChanLength":{"representation":"count","value":0},"Name":"Router","ProcessMessageCount":{"representation":"count","value":262}}],"inputs":[{"Name":"testfile","testfile-bytes":{"representation":"count","value":84419},"testfile-filename":{"representation":"","value":"/tmp/test.log"}}],"outputs":[{"InChanCapacity":{"representation":"count","value":30},"InChanLength":{"representation":"count","value":0},"LeakCount":{"representation":"count","value":0},"MatchAvgDuration":{"representation":"ns","value":1506},"MatchChanCapacity":{"representation":"count","value":30},"MatchChanLength":{"representation":"count","value":0},"Name":"Dashboard"},{"InChanCapacity":{"representation":"count","value":30},"InChanLength":{"representation":"count","value":0},"LeakCount":{"representation":"count","value":0},"MatchAvgDuration":{"representation":"ns","value":550},"MatchChanCapacity":{"representation":"count","value":30},"MatchChanLength":{"representation":"count","value":0},"Name":"filewriter"}],"splitters":[{"Name":"testfile-TokenSplitter-1"}]}

这是什么,为什么是写的,我怎么禁用它?

更新:我已经从ticker_interval中删除了DashboardOutput,但是问题仍然存在。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2016-01-05 09:33:07

显然,DashboardOutputticker_interval从默认的0重写为5,因此为了消除这些字符串,应该将ticker_interval = 0添加到它的配置中。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/34607754

复制
相关文章

相似问题

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