-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Is there any plan for prometheus to support string type metrics? #2227
Comments
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. |
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. |
Yes. If you're looking for that you probably want an event logging solution, such as ELK. |
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? |
Strings aren't metrics. |
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>
.
|
Got it. Thank Brian and Matthias. |
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. |
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?
The text was updated successfully, but these errors were encountered: