Search code examples
hekad

Heka writing debug output to file every 15 seconds?


I'm trying to figure out Heka configuration, and made such a test config:

[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

Next I write to log with while true; do date >> /tmp/test.log ; sleep 1; done and I would expect /tmp/output.log to get filled with the same info, yet regardless of whether test.log is written to or not, output log gets filled with info like:

[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"}]}

What is this, why is it written, how do I disable it?

update: I've removed ticker_interval from DashboardOutput, yet the problem persists.


Solution

  • Apparently DashboardOutput overrides ticker_interval from the default of 0 to 5, so in order to get rid of those strings, ticker_interval = 0 should be added to its config.