Note - the Prometheus users group is a better place for this type of question. https://groups.google.com/forum/#!forum/prometheus-users
On Monday, March 15, 2021 at 12:30:29 PM UTC Harry Perks wrote: > Does ifOutOctets have a label ifName? If not, you'll need to perform a > vector match operation - it looks like ifIndex can be used: > > sum by(ifName) (ifOutOctets * on(ifIndex) group_left(ifName) ifName) > > On Monday, March 15, 2021 at 11:38:41 AM UTC [email protected] wrote: > >> >> Hello, >> >> I have a certain requirement to implement in Grafana where we need to >> show interface utilization for switch. >> >> I got combination of two queries in order to achieve it >> >> 1) ifOutOctets{hostname="XX",ifIndex="103",instance="XX",job="SNMP"} >> >> 2) >> ifName{hostname="XX",ifIndex="103",ifName="Te1/0/1",instance="XX",job="SNMP"} >> >> First query -- It gives interface utilization on specific index >> >> Second query --- It gives interface name mapped to specific index >> >> Now How can I combine both these query in a way that I get interface >> utilization on interface name not on index. >> >> Pls advice. >> >> Thanks, >> Saurabh > > -- You received this message because you are subscribed to the Google Groups "Prometheus Developers" 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-developers/2c4d0f96-07a0-4c84-bd78-569daf3d3bf5n%40googlegroups.com.

