Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add prometheus serializer #5350

Closed
aixeshunter opened this issue Jan 28, 2019 · 2 comments
Closed

Add prometheus serializer #5350

aixeshunter opened this issue Jan 28, 2019 · 2 comments

Comments

@aixeshunter
Copy link

Feature Request

Opening a feature request kicks off a discussion.

Proposal:

Add a serializer that support Prometheus text exposition format

Current behavior:

No such serializer

Desired behavior:

[[outputs.file]]
  ## Files to write to, "stdout" is a specially handled file.
  files = ["stdout", "/tmp/metrics.out"]

  ## Data format to output.
  ## Each data format has its own unique set of configuration options, read
  ## more about them here:
  ## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_OUTPUT.md
  data_format = "prometheus"

Use case: [Why is this important (helps with prioritizing requests)]

The telegraf was installed in VM, we hope the metrics will be stored in prometheus. And we have a component to get prometheus from vm serial port not http.

@danielnelson
Copy link
Contributor

We have an open issue for this #4414.

I do have some concerns around streaming prometheus format in this way, as it won't behave identically to the prometheus output with respect to timestamps and multiple values. It may be preferable to send data_format = "influx" out of VM and convert to prometheus format outside using a second instance of Telegraf.

@aixeshunter
Copy link
Author

aixeshunter commented Feb 2, 2019

@danielnelson Thanks for your answer.In my opinion, I installed the prometheus node-exporter in VM, telegraf which installed in vm got the metrics from node-exporter and output to file(vm virtual serial port).
Then, the external component that in hypervisor listened the serial port(linux socket) and got the metrics.
But in this way we have to maintain node-exporter in VM, and the telegraf just did the forwarding work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants