Hello Everyone,

How to sum according to "@...@" on ifAlias which changes dynamically in 
addition to this ifAlias are not totally same but @..@ are same on ifAlias.
if they are same, I want to aggregate them. I tried to query below which is 
not so dynamic. 

sum by (instance) 
(rate(ifHCInOctets{ifAlias=~"^QinQ_.*020000026586.*_NNI.*"}[10m]) * 8) and 
on(instance) sysName{sysName =~ ".*$name.*"} 

How to make dynamic like if they x combine them, if they are y combine 
them, etc.

{ifAlias="QinQ_BTS_B4965_ABIS@020000026586@||TT/ME-200-10000||_NNI_BKD", 
ifDescr="GigabitEthernet3/1/0.2068", ifIndex="494", instance="10.85.7.2", 
job="ptn"}
{ifAlias="QinQ_NodeB_B4965@020000026586@||TT/ME-200-10000||_NNI_BKD", 
ifDescr="GigabitEthernet3/1/0.1088", ifIndex="495", instance="10.85.7.2", 
job="ptn"}
{ifAlias="QinQ_eNodeB_B4965_OAM@020000026586@||TT/ME-200-10000||_NNI_BKD", 
ifDescr="GigabitEthernet3/1/0.3662", ifIndex="493", instance="10.85.7.2", 
job="ptn"}
{ifAlias="QinQ_eNodeB_B4965_S1_X2@020000026586@||TT/ME-200-10000||_NNI_BKD", 
ifDescr="GigabitEthernet3/1/0.3661", ifIndex="492", instance="10.85.7.2", 
job="ptn"}

{ifAlias="QinQ_BTS_C1623_ABIS@020000026587@||TT/ME-200-10000||_NNI_BKD", 
ifDescr="GigabitEthernet3/1/0.2067", ifIndex="496", instance="10.85.7.2", 
job="ptn"}
{ifAlias="QinQ_NodeB_C1623@020000026587@||TT/ME-200-10000||_NNI_BKD", 
ifDescr="GigabitEthernet3/1/0.1098", ifIndex="497", instance="10.85.7.2", 
job="ptn"}
{ifAlias="QinQ_eNodeB_C1623_OAM@020000026587@||TT/ME-200-10000||_NNI_BKD", 
ifDescr="GigabitEthernet3/1/0.3663", ifIndex="498", instance="10.85.7.2", 
job="ptn"}
{ifAlias="QinQ_eNodeB_C1623_S1_X2@020000026587@||TT/ME-200-10000||_NNI_BKD", 
ifDescr="GigabitEthernet3/1/0.3664", ifIndex="499", instance="10.85.7.2", 
job="ptn"}

Thanks.

-- 
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/f253a50c-8bbb-4036-896a-b0e43d834ad7n%40googlegroups.com.

Reply via email to