Replies: 2 comments 3 replies
-
Hi Nabheet, my understanding is a Prometheus metric can only have one value, I don't think it's possible to add another. Not sure what your use case is but I think you'd be better off sending both values separately and then combining them when you query from your data store |
Beta Was this translation helpful? Give feedback.
-
Ok thanks for sharing the use case here. So in theory you should be able to do something like this in the collector: processors:
metricstransform:
transforms:
- include: <your_metric_name>
match_type: strict
action: update
operations:
- action: aggregate_label_values
label: status
aggregated_values: [ good, meh ]
new_value: <new_label>
aggregation_type: sum I haven't tested that, but in theory it should grab any of the metrics (I am assuming the actual name is the same for all those) then if they have a status tag with a value of good or meh, sum the values. |
Beta Was this translation helpful? Give feedback.
-
Is there a way to add two datapoints in a metric? Google and ChatGPT haven’t really provided anything helpful.
In particular, I have a Prometheus receiver scraping the output here https://github.com/mdawar/rq-exporter. I need to add values for two statuses for the same queue name attributes on a datapoint.
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions