avg_over_time({__name__=~".*_pool_Usage",quantile="0.999"}[1m])
Thank you for your suggestion. We are in the process of migrating our metrics to client_java of prometheus. We will send some PR's for missing modules it has. However currently we are using coda hale's metric and unfortunately it is including names pool names in the metric name.
I have still 2 questions:1. I can understand that there is not an easy way to declaratively to specify which labels should be included in the result.
I can only say for this that if a user includes __name__ in the query, it might be a good idea to return with it. At least __name__ with regex search might return __name__ since it is not clear which data is belonging to which series. Don't you think so?
2. Why are not results returning name of the series? I can only see "{job="kubernetes-applications-pods",kubernetes_namespace="prod",kubernetes_pod_name="xxx-yyy-app-2673296454-g451v",pod_template_hash="2673296454",quantile="0.999"} 21". I expect name of the series at the beginning as well. What is wrong with it?
On Monday, May 1, 2017 at 1:41:42 PM UTC+3, Brian Brazil wrote:On 1 May 2017 at 11:35, Cemalettin Koc <cemalet...@gmail.com> wrote:Hi,I would like to query against internal labels as specified in the documentation.avg_over_time({__name__=~".*_pool_Usage",quantile="0.999"}[1m])This is resulting without __name__ or metric name in the beginning of data. I am expecting to include __name label or name in the beginning of the results. Why name of the series are not included in the results? What is wrong with it?Most functions and operators will remove the __name__, as the output is no longer that name (e.g. if I multiply users by 0, it's no longer a count of users).You should look at using labels to distinguish these series rather than the metric name, or explicitly list each metric name you want.--Brian Brazil
--
You received this message because you are subscribed to the Google Groups "Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-users+unsubscribe@googlegroups.com.
To post to this group, send email to prometheus-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/3f752983-5071-49cb-b5b0-3cd841cf967f%40googlegroups.com.
__name__ is special. Once you e.g. take an average over time we know longer know what the name is, so exclude it.
__name__ is special. Once you e.g. take an average over time we know longer know what the name is, so exclude it.If I query metric name with regex search, how I can know which data belongs to which series?
Please forgive my ignorance. I am quite new to prometheus. I can not follow why series semantically are not correct anymore.{__name__=~"node_disk.*"} -> this returns with names.{__name__=~"node_disk.*"}[60s] -> this range vector also returns with namesavg_over_time({__name__=~"node_disk.*"}[60s]) -> this does not return namesFor me this should also return names since the range vector also is containing series are including names. Would you please explain me why this is semantically not correct? I would be glad that if you give an example too.
A metric name describes the thing that is being measured. If you select a raw metric samples, the metric name matches what the sample value represents. If you do an operation like avg_over_time() on said samples, you now have a different metric, and the old name is no longer the right description for it. Rather, the new correct metric name would be something like "instance_device:node_disk_sectors_read:avg1m" - actually not sure what our naming convention for an over-time-averaged metric name suffix would be, but at least it's not the original metric anymore, it's a transformation thereof.
metric_relabel_configs:
- source_labels: [__name__]
regex: (.+)_pool_.*