>I don't understand what you're saying. You gave the following example:
my_metric{label1=“foo-foo-foo”, label2=“foo”}
Ok.
My real example. I have postgres "my-db-name" in a cloud and need to
construct grafana dashboard, for example "query count" for it.
1. I get variable (database) in grafana from metric which has label with
database name (_pg_database_size{dbname="my-db-name",
dbunderscore="my_db_name"<other labels>}):
label_values(_pg_database_size{resource_id="$instance"}, dbunderscore)
where 'dbunderscore' it's a label i extracted from label "dbname" replacing
'-' to '_' using “metric_relabel_configs” method.
2. then i need metric query count:
>From exporter:
pooler_my_db_name_query_count{<many labels>} it doesn't have label for
databasename, the databasename is in metric name but all '-' replaced with
'_'
So, in grafana promql i make query like this: pooler_${database}_query_count
понедельник, 4 июля 2022 г. в 16:58:49 UTC+3, Brian Candler:
> On Monday, 4 July 2022 at 14:10:33 UTC+1 [email protected] wrote:
>
>> >If it's someone else's exporter - then use the labels as they are.
>> it isn't possible because they use label as part of the metric name with
>> '_'
>>
>
> I don't understand what you're saying. You gave the following example:
>
> my_metric{label1=“foo-foo-foo”, label2=“foo”}
>
> Here the metric name is "my_metric" and label1 is "foo-foo-foo". I don't
> see the relationship. (Of course there is a hidden label,
> __name__="my_metric")
>
> In any case, you can aggregate over labels independently of the metric
> name. Can you give an example of an actual metric from this cloud
> exporter, and what problem it causes?
>
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/prometheus-users/59e414e8-9b2f-4891-a4c8-6c351b69db80n%40googlegroups.com.