Is there a way to group all metrics of an app by metric names? A portion from a query listing all metrics for an app (i.e. {app="bar"}
) :
ch_qos_logback_core_Appender_all_total{affiliation="foo",app="bar", instance="baz-3-dasp",job="kubernetes-service-endpoints",kubernetes_name="bar",kubernetes_namespace="foobarz",kubernetes_node="mypaas-dev-node3.fud.com",updatedBy="janedoe"} 44 ch_qos_logback_core_Appender_debug_total{affiliation="foo",app="bar", instance="baz-3-dasp",job="kubernetes-service-endpoints",kubernetes_name="bar",kubernetes_namespace="foobarz",kubernetes_node="mypaas-dev-node23.fud.com",updatedBy="deppba"} 32
I have also tried to use wildcard in the metric name, prometheus is complaining about that. Looking at the metrics, I can see that some of them have dynamic names, most probably delivered by dropwizard metrics. What I ultimately want is a list of all available metrics.
PromQL supports the ability to join two metrics together: You can append a label set from one metric and append it to another at query time. This can be useful in Prometheus rule evaluations, since it lets you generate a new metric for a series by appending labels from another info metric.
Unfortunately, it is not possible to change the labels on old metrics in Prometheus. The storage is only updated by new scrapes and then it becomes immutable.
Universal: Metric names are made up of words separated by underscores. Words use only lowercase letters and numbers (7bit ASCII). Metrics names should start with a letter. Any other punctuation or symbols are proscribed as they might have special use in a downstream system.
The following query lists all available metrics:
sum by(__name__)({app="bar"})
Where bar
is the application name, as you can see in the log entries posted in the question.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With