The following Prometheus query bsnAPIfLoadChannelUtilization{bsnAPIfSlotId="0",job="cisco_wlc_9800",bsnAPName=~"(AP1)"}'
generates the following labels and values:
bsnAPIfLoadChannelUtilization{bsnAPIfSlotId="0", bsnAPName="AP1", instance="192.168.1.1", job="cisco_wlc_9800"} = 96
This second query ‘bsnAPIfPhyChannelNumber{bsnAPIfSlotId="0",job="cisco_wlc_9800",bsnAPName=~"(AP1)"}
’ generates the following labels and values:
bsnAPIfPhyChannelNumber{bsnAPIfSlotId="0", bsnAPName="AP1", instance="192.168.1.1", job="cisco_wlc_9800"} = 6
How can I take the value of the second query ‘bsnAPIfPhyChannelNumber’ and create a new label to the first query ‘bsnAPIfLoadChannelUtilization’. Desired output:
bsnAPIfLoadChannelUtilization{bsnAPIfSlotId=“0”, bsnAPName=“AP1”, instance=“192.168.1.1”, job=“cisco_wlc_9800”, bsnAPIfPhyChannelNumber=“6” } = 96
I’ve tried various AI inspired queries using group_left without success. Ultimately I’m trying to show the channel number next to the AP name in Grafana legend.
Thank you.