Hi
want to monitor ibm iib using this ib-metrics-pyclient , pushgateway and it will publish metrics each second on input http on server http://192.168.1.1:9091/metrics .
Add inputs.http plugin in telegraf and start and got this error:
telegraf[227536]: 2024-07-05T12:05:10Z E! [inputs.http] Error in plugin: [url=http://192.168.1.1 >
parsing metrics failed: metric parse error: expected field at 3:49: “go_gc_duration_seconds{quantile="0"} 0.000208915”
current format that publish in http:
go_gc_duration_seconds{quantile=“0”} 0.000208915
Line protocol format:
measurement,tag1=value1,tag2=value2 field1=value3,field2=value4 timestamp
Expected output
go_gc_duration_seconds,quantile=“0” value=0.000208915 1625487910
Is there any way to fix in telegraf?
Thanks
You need to set the data_format
value in yoru plugin. By default is is expected to be line protocol, but you can also use prometheus. See the input data formats list:
# Input Data Formats
Telegraf contains many general purpose plugins that support parsing input data
using a configurable parser into [metrics][]. This allows, for example, the
`kafka_consumer` input plugin to process messages in any of InfluxDB Line
Protocol, JSON format, or Apache Avro format.
- [Avro](/plugins/parsers/avro)
- [Binary](/plugins/parsers/binary)
- [Collectd](/plugins/parsers/collectd)
- [CSV](/plugins/parsers/csv)
- [Dropwizard](/plugins/parsers/dropwizard)
- [Form URL Encoded](/plugins/parsers/form_urlencoded)
- [Graphite](/plugins/parsers/graphite)
- [Grok](/plugins/parsers/grok)
- [InfluxDB Line Protocol](/plugins/parsers/influx)
- [JSON](/plugins/parsers/json)
- [JSON v2](/plugins/parsers/json_v2)
- [Logfmt](/plugins/parsers/logfmt)
- [Nagios](/plugins/parsers/nagios)
This file has been truncated. show original