Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upIs there any plan for prometheus to support string type metrics? #2227
Comments
This comment has been minimized.
This comment has been minimized.
|
There's no plans to support non-numeric values. However you can put strings into labels. Arbitrary string messages are usually bad idea, as each value will be a new time series which will run you into performance issues. |
brian-brazil
added
the
kind/question
label
Nov 28, 2016
This comment has been minimized.
This comment has been minimized.
|
Hi Brian, you mean it is a bad idea to use arbitrary string message as labels? That's also one of the reasons I am hesitate using that way. |
This comment has been minimized.
This comment has been minimized.
|
Yes. If you're looking for that you probably want an event logging solution, such as ELK. |
This comment has been minimized.
This comment has been minimized.
|
ELK is a very capable logging solution. I am trying to see if I can use one stack to satisfy my application requirements. Is there any specific reason not supporting string metrics type? |
This comment has been minimized.
This comment has been minimized.
|
Strings aren't metrics. |
This comment has been minimized.
This comment has been minimized.
|
Storing strings would require a complete new storage schema and is
fundamentally different from storing time series of numbers. Prometheus'
storage efficiency heavily relies on this uniformity.
As for your original use case, there are a few ways to represent this as
metrics provided the number of states is bounded (not arbitrary!). The
simplest one would be to just map states to some integer values. You can
for example count_by_value or alert on that pretty easily.
…On Mon, Nov 28, 2016, 09:20 Brian Brazil ***@***.***> wrote:
Strings aren't metrics.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#2227 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAICBg30dS9eIfjWwlgUpJLZBQ4x1TV8ks5rCo6ygaJpZM4K9c_R>
.
|
This comment has been minimized.
This comment has been minimized.
|
Got it. Thank Brian and Matthias. |
aaskey
closed this
Nov 28, 2016
sevagh
referenced this issue
Mar 28, 2018
Open
Update nomad metrics to include information about Job status #4036
This comment has been minimized.
This comment has been minimized.
lock
bot
commented
Mar 24, 2019
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
aaskey commentedNov 28, 2016
Currently prometheus metrics types include counter, gauge, histogram, and summary. They are all numeric types. I would like to see if prometheus can support string type metrics. For example, to report system state in "start", "running", "pause", "bypass", "stop", or sometimes, arbitrary string message, then apply aggregation functions to the values. Is there any way to do it now? If not, is there plan to support it?