Conditions in prometheus to look for certain data when a label matches a value

157 Views Asked by At

I am looking to create a query wherein It should look for interface A and B if the instance is Host1 or else it should look for interface C & D? I was thinking something along below lines but I guess this is not right?

(ifName{ifName=~"(A|B)"} if (ifAdminStatus{instance="Host"})) default ifName{ifName=~"pether[C|D]"}

Can I please get some help here?

0

There are 0 best solutions below