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

Metric's TYPE value in output.prometheus plugin #5414

Closed
rumato163 opened this issue Feb 12, 2019 · 3 comments
Closed

Metric's TYPE value in output.prometheus plugin #5414

rumato163 opened this issue Feb 12, 2019 · 3 comments
Labels
area/prometheus feature request Requests for new plugin and for new features to existing plugins

Comments

@rumato163
Copy link

rumato163 commented Feb 12, 2019

Feature Request

Opening a feature request kicks off a discussion.

Proposal:

To be able to set metirc's TYPE for prometheus output

Current behavior:

Currently almost all of unstandart methrics (like an inputs.exec generated) get "#TYPE untyped"
For example even standart system metric from telegraf: "# TYPE ntpq_when untyped"

Desired behavior:

Get the parameter in prometheus output plugin to modify "# TYPE ... untyped" string for exact metric names

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

One of the greates thing in Prometheus is that it has different metric types and can collect and store them in different ways depends on it's type.
Most painfull point is that there is no possibility to use "counter" metric power when you create a custom metric and put in html within output.prometheus.
Because it becomes "untyped" and you have to calculate a sum of previous and current value right on a source.
It would be great if some "name" and "type" parameters will appear in prometheus output plugin. And give us possibility to change the type of each metric this way

@danielnelson
Copy link
Contributor

You can set this information on data sent to the prometheus input, and when we add the prometheus parser #4414 it will be possible to do this from an exec script as well.

It is possible to set this type in input plugins, some are currently doing this, but I don't want to start adding these type hints to all of them until we have a better way to send metadata as described in #3670.

I believe these types are just more or less documentation, since AFAIK they are not used by prometheus. I checked prometheus documentation again and it says:

The Prometheus server does not yet make use of the type information and flattens all data into untyped time series. This may change in the future.

@danielnelson danielnelson added feature request Requests for new plugin and for new features to existing plugins area/prometheus labels Feb 12, 2019
@rumato163
Copy link
Author

Hi.
Got it.
Prometheus parser would be the best option for my porposes.
Because use the schema - create a script to send static to inputs.prometheus, path true it to output.prometheus is not so clear and well handled.
Also the TYPE counter works fine in Prometheus and let you send data to prommetheus as rate but store them as huge count.

@danielnelson
Copy link
Contributor

Let's close this issue then and you can keep an eye on #4414 for updates on adding a prometheus parser.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/prometheus feature request Requests for new plugin and for new features to existing plugins
Projects
None yet
Development

No branches or pull requests

2 participants