I had same problem. so I made new branch for support typed message_fields.

https://github.com/Bloodevil/heka/commit/5b315377ffdd1735b90c4afa7658ae57146b4572
 
<https://github.com/Bloodevil/heka/commit/5b315377ffdd1735b90c4afa7658ae57146b4572>
https://github.com/Bloodevil/heka/tree/message_fields_add_type 
<https://github.com/Bloodevil/heka/tree/message_fields_add_type>

you can use like below

> Latency||int = "%Latency%”

fieldname|{representation}|{type}


As I know there are some similar commit on 
https://github.com/Bloodevil/heka/commit/2d3eae50b11e9c1678f7f1b48652eaea50c561c9
 
<https://github.com/Bloodevil/heka/commit/2d3eae50b11e9c1678f7f1b48652eaea50c561c9>
but this branch is too old so can’t patch to master(over 0.9.2) using this code.

I didn’t pull request to dev cause I think heka already have that kinds of 
branch 
(https://github.com/mozilla-services/heka/tree/message-template-typed-fields 
<https://github.com/mozilla-services/heka/tree/message-template-typed-fields>) 
- didn’t merged yet but…

if you want to use immediately you can fix a code like my commit.

Thanks
-Yeaji


> 2015. 6. 11., 오전 3:43, Jorge L. <[email protected]> 작성:
> 
> I'm using PayloadRegexDecoder to parse a CSV file. However, I don't know how 
> to set a specific message field as a number (integer). All the message fields 
> are set as strings.
> 
> [transform_decoder.message_fields]
> 
> Latency = "%Latency%"
> 
> Then, when I try to render the Latency in grafana (from influxdb), it is a 
> string and it cannot calculate a mean value (or any other operation).
> 
> I've tried with:
> 
> Latency|B = "%Latency%"
> Latency|count = "%Latency%" 
> Latency|2 = "%Latency%" 
> without success.
> 
> Is there any way to indicate the type of a field in PayloadRegexDecoder?
> How could I implement it?
> 
> 
> 
> 
> _______________________________________________
> Heka mailing list
> [email protected]
> https://mail.mozilla.org/listinfo/heka

_______________________________________________
Heka mailing list
[email protected]
https://mail.mozilla.org/listinfo/heka

Reply via email to