>  (a) Does prometheus support array as a value for label?

No.  The data model is described 
at https://prometheus.io/docs/concepts/data_model/, although it could 
perhaps be more clear that label values are strings.
You are free to encode anything you like as a string.

> (b)  ... with label channel_id that has the value as a list of channel 
ids ...

Sorry, Prometheus does not have this feature.

On Thursday, 27 February 2025 at 10:11:35 UTC [email protected] wrote:

> Hello, 
> I have the following questions and requesting your help in answering them.
>
> (a) Does prometheus support array as a value for label?
> For example, channel_id: [100, 200, 300]
>
> (b) Suppose we are sending metric channel_status for each streaming 
> channel  with sample value of 1 if it is up and value of 0 if it is down. 
> The metric has a label, channel_id: <channel id>
> We would like to create a recording rule to generate a new metric, called 
> channel_down. For this, we would like to check periodically if 
> channel_status =0 for any channel  among all channels, and write a single 
> channel_down metric sample with label channel_id that has the value as a 
> list of channel ids which correspond to all the channels that are down.
>
> I wonder how recording rule can dynamically assign values to the label.  I 
> need your help here please.
>
> Than you
>
>

-- 
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 visit 
https://groups.google.com/d/msgid/prometheus-users/241a1d4a-e375-4440-8c9e-07d8f72b3dcdn%40googlegroups.com.

Reply via email to