Telegraf: Add prometheus parser and serializer

Created on 12 Jul 2018  Â·  11Comments  Â·  Source: influxdata/telegraf

Feature Request

Proposal:

Add a parser and a serializer that support Prometheus text exposition format

Current behavior:

No such parser/serializer

Desired behavior:

data_format = `prometheus`

Use case:

Would be useful for integrating with services which use this format but do not use HTTP, and for transferring prometheus specific metadata such as TYPE and HELP (#4354)

areagent areprometheus feature request

Most helpful comment

Right now we have only a serializer for Prometheus data format, so it can only be used in output plugins. Hoping to add a parser so it can be used in the file input in the future.

All 11 comments

Interested in similar, would like to use http output plugin to perform a post of metrics to a custom collector in Prometheus exposition format. Do we know if anyone is considering this?

It is something we are planning to do but have not started work on. You might also be interested in #5003.

Thanks this is not bad but I am looking to leverage the http outputs plugin to post and just put the data in prom expos format

I’m thinking it’s not to difficult

Sent from my iPhone

On Feb 6, 2019, at 4:53 PM, Daniel Nelson <[email protected]notifications@github.com> wrote:

External Email: Use caution with links and attachments

It is something we are planning to do but have not started work on. You might also be interested in #5003https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_influxdata_telegraf_pull_5003&d=DwMCaQ&c=zUO0BtkCe66yJvAZ4cAvZg&r=PX3mIUBgypJ_Ngt43z45tkt-jfL2ASCsYjTQMG7c-mU&m=qPnji9u_A_2Sar5QGVfTn39g-78wpCs_bRBBUdTzW34&s=uibJCq6Clry3YHKodncpYNS_A2ccWpuzDKSJlszQcgk&e=.

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_influxdata_telegraf_issues_4414-23issuecomment-2D461202748&d=DwMCaQ&c=zUO0BtkCe66yJvAZ4cAvZg&r=PX3mIUBgypJ_Ngt43z45tkt-jfL2ASCsYjTQMG7c-mU&m=qPnji9u_A_2Sar5QGVfTn39g-78wpCs_bRBBUdTzW34&s=SruvBs3WWcFjG6DDkptlxPDJIHB8u928GGRiE-eZefQ&e=, or mute the threadhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AYebAmwTLYNWKqbaNBscLx25jGJA4njBks5vK07RgaJpZM4VMORI&d=DwMCaQ&c=zUO0BtkCe66yJvAZ4cAvZg&r=PX3mIUBgypJ_Ngt43z45tkt-jfL2ASCsYjTQMG7c-mU&m=qPnji9u_A_2Sar5QGVfTn39g-78wpCs_bRBBUdTzW34&s=E2049ArdQPMFB0-4rg1i0g4jkMWCASEBcdWy8VEDhQU&e=.

This message may contain information that is confidential or privileged. If you are not the intended recipient, please advise the sender immediately and delete this message. See http://www.blackrock.com/corporate/compliance/email-disclaimers for further information. Please refer to http://www.blackrock.com/corporate/compliance/privacy-policy for more information about BlackRock’s Privacy Policy.
For a list of BlackRock's office addresses worldwide, see http://www.blackrock.com/corporate/about-us/contacts-locations.

© 2019 BlackRock, Inc. All rights reserved.

I'm interested in this feature as well. My use case is because I have some systems that logs the metrics to a file and telegraf has a file plugin, but it cannot parse the Prometheus metrics. The interesting part is that Telegraf is capable to read Prometheus metrics from http requests and also can expose as client, but cannot parse it.

Also this could be useful to avoid having to install a Prometheus PushGateway, if I understand correctly. We could push prometheus metrics directly into Telegraf.

Hi! Is there any planning for this feature?
Or mb other suggestion on how to handle my usecase:
I am using kafka consumer plugin and the data that I try to get from there is in prometheus format which is not supported. (then I output with prometheus out put plugin)

@elithe1 I've got the same use case, so wondering if you've managed to get it working somehow?

+1

I actually ended up writing my own parser. Tou can still some good code
from the repo from other prometheus stuff there

On Wed, 4 Mar 2020 at 21.33, Vlad Pedosyuk notifications@github.com wrote:

@elithe1 https://github.com/elithe1 I've got the same use case, so
wondering if you've managed to get it working somehow?

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/influxdata/telegraf/issues/4414?email_source=notifications&email_token=ADJSLMP6VIPCOJEI37UDJMLRF23H3A5CNFSM4FJQ4REKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEN2DQHA#issuecomment-594819100,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ADJSLMNK5UCZQM7PC3TEAHTRF23H3ANCNFSM4FJQ4REA
.

If I understand correctly, for now file input plugin is not supporting prometheus data format ?

Right now we have only a serializer for Prometheus data format, so it can only be used in output plugins. Hoping to add a parser so it can be used in the file input in the future.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

timhallinflux picture timhallinflux  Â·  3Comments

Bregor picture Bregor  Â·  3Comments

mrcheeky123 picture mrcheeky123  Â·  3Comments

grafanaUser123 picture grafanaUser123  Â·  3Comments

robert-gomes picture robert-gomes  Â·  3Comments