Do we have if/else feature in promql #9469
Unanswered
ankurnigam
asked this question in
Q&A
Replies: 1 comment
-
This is possible with PromQL already:
Alternative answer: |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi Team ,
I am having one business case where I am getting set of values , I want to develop/record new metric based on certain values of the metrics .
Do we have if/else feature in promql.
Used Case :
Metric name => my_metric{name="abc"}
Sample values => 0,1,2,3,4,5,6,7,12,14,16
New metric want to develop
if metric value is 0,1,2,3,4,5
change value to 0
if metric value is 12,14,16
change value to 1
Beta Was this translation helpful? Give feedback.
All reactions