Your setup is working exactly as it should. When the data is run through
the MemStatsDecoder, it is parsed from the message payload and stored in
various message fields. By default the payload is then removed from the
message.
Your LogOutput is using a PayloadEncoder, so it is dutifully showing the
empty payload field. You'll be able to see the original payload value if
you add a `[MemStatsDecoder.config]` section and set `payload_keep = true`.
Even better, though, would be to output the whole message so you can see
all of the fields and not just the payload. To do this you can switch
from using a PayloadEncoder to using the RstEncoder
(http://hekad.readthedocs.org/en/v0.10.0b1/config/encoders/rst.html).
-r
On 08/26/2015 11:50 AM, Ho, Ming wrote:
Hi Rob,
I have a project to take a look at heka. I am new to heka. I got it
installed and running a couple days ago. I am able to use heka to do
some very simple log watching. Now I try (just to learn as an example)
the following syntax in my config.toml and expect to see some data in
stdout.
[MemStats]
type = "FilePollingInput"
ticker_interval = 5
file_path = "/proc/meminfo"
decoder = "MemStatsDecoder"
[MemStatsDecoder]
type = "SandboxDecoder"
filename = "lua_decoders/linux_memstats.lua"
[PayloadEncoder]
#append_newlines = false
append_newlines = true
# LogOutput plugin ouput to stdout
[LogOutput]
message_matcher = "TRUE"
encoder = "PayloadEncoder"
But when I run hakad with this, all I get is the date time every 5
seconds without any data/,/ e.g.:
2015/08/26 18:37:04
2015/08/26 18:37:09
2015/08/26 18:37:14
2015/08/26 18:37:19
What am I doing wrong? My final goal is to use "Apache Access Log
Decoder" to capture access.log and then use "ElasticSearch JSON Encoder"
to send data to ElasticSearch (I know it is a long way to go for me!)
Appreciate your help in advance.
Thanks.
Ming Ho
_______________________________________________
Heka mailing list
[email protected]
https://mail.mozilla.org/listinfo/heka