go-graphite / carbon-clickhouse

Graphite metrics receiver with ClickHouse as storage
MIT License
186 stars 48 forks source link

telegraf_http_json reader fails with current telegraf #20

Closed bzed closed 5 years ago

bzed commented 6 years ago

Hi,

the current telegraf version ships this field (and maybe others), where the fields value is a not a Float64:

{"fields":{"uptime_format":" 1:08"},"name":"system","tags",{"host":"congraphitedev002"},"timestamp":1533817280}]}

which results in a 500 Internal server error:

json: cannot unmarshal string into Go struct field TelegrafHttpMetric.fields of type float64

... obviously.

Reading trough https://github.com/influxdata/telegraf/issues/642 it seems that there are also other things like booleans....

Current telegraf supports tags on the standard graphite protocol now, I'll give that a try now.

lomik commented 6 years ago

Thanks for report. Fix https://github.com/lomik/carbon-clickhouse/commit/8406752c419387048a03de051b34f5aaf39dd975