Judging by the scrollback in the IRC channel it seems like you may hav
figured this out, but I'll reply anyway so everyone else can see.
If you want to route other stats in a different way you can configure a
separate set of StatsdInput, StatAccumInput, and HttpOutput plugins. The
config might look something like this:
[statsd_input2]
type = "StatsdInput"
stat_accum_name = "stat_accumulator2"
address = ":8126"
[stat_accumulator2]
type = "StatAccumInput"
ticker_interval = 30
emit_in_fields = true
message_type = "my.statmetric"
[influx2]
type = "HttpOutput"
message_matcher = "Type == 'my.statmetric'"
address = "http://127.0.0.1:8086/db/otherdatabase/series"
encoder = "statmetric_influx_encoder"
username = "otherdatabaseuser"
password = "-secret-"
The main things to notice are that the new StatsdInput explicitly uses
the new accumulator, the new accumulator specifies the message type as
"my.statmetric" (instead of the default of "heka.statmetric"), and the
new HttpOutput is listening for the "my.statmetric" types. You probably
want to choose plugin names that tell you what sort of data is being
processed (as opposed to "statsd_input2", "stat_accumulator2", etc.),
but the idea should be clear.
As for routing messages generated by a ProcessInput to InfluxDB, that
depends on having an HttpOutput configured with a message_matcher that
will match the messages that the ProcessInput is emitting. I don't know
anything about what those messages will look like, so I can't help you
beyond that, but you can match on just about any message value, see
http://hekad.readthedocs.org/en/v0.9.1/message_matcher.html. If you need
to see the messages flowing through so you can get an idea what they
look like to construct your matcher, you might set up a LogOutput w/ an
RstEncoder: http://hekad.readthedocs.org/en/v0.9.1/config/encoders/rst.html
Hope this helps,
-r
On 04/23/2015 04:23 AM, Waqar Khan wrote:
Hi all,
Im very new to hekad and want to know a little more about inputs mapping
to their outputs. Below is my config file, which is working with a
statsd input, I send a UDP packet to localhost:8125 and I can see the
series being created in influxdb.
I am on version 0.9.2
[hekad] maxprocs = 2 [statsd_input] type = "StatsdInput" stat_accum_name
= "stat_accumulator" address = ":8125" [stat_accumulator] type =
"StatAccumInput" ticker_interval = 30 emit_in_fields = true [stat_graph]
type = "SandboxFilter" filename = "lua_filters/stat_graph.lua"
ticker_interval = 30 preserve_data = true message_matcher = "Type ==
'heka.statmetric'" [stat_graph.config] num_rows = 300 secs_per_row = 1
stats = "stats.counters.000000.count stats.counters.000001.count
stats.counters.000002.count" stat_labels = "counter_0 counter_1
counter_2" preservation_version = 0 [DashboardOutput] ticker_interval =
30 [statmetric_influx_encoder] type = "SandboxEncoder" filename =
"lua_encoders/statmetric_influx.lua" [influx] type = "HttpOutput"
message_matcher = "Type == 'heka.statmetric'" address =
"http://127.0.0.1:8086/db/testdatabase/series" encoder =
"statmetric_influx_encoder" username = "testdatabaseuser" password =
"-my password-"
I would like to add a new statsd input but this time output to a
different database in influxdb. Can someone please guide me on how I can
do this?
Also with the process input plugin. Is it possible to forward this
output to a influxdb database?
Thanks in advance!
_______________________________________________
Heka mailing list
[email protected]
https://mail.mozilla.org/listinfo/heka
_______________________________________________
Heka mailing list
[email protected]
https://mail.mozilla.org/listinfo/heka