knightss27 / grafana-network-weathermap

A fully featured and customizable network weathermap plugin for Grafana (9.0+).
https://grafana.com/grafana/plugins/knightss27-weathermap-panel/
Apache License 2.0
132 stars 6 forks source link

ifHCOutOctets and ifHCInOctets SNMP Queries Return Identical Values #63

Closed danielcodau closed 11 months ago

danielcodau commented 11 months ago

Bug Report: Inaccurate Ingress/Egress Traffic Values in Grafana

Description: Hello! First of all, I'd like to thank you for the plugin. I've been using it for a while now, and it's been great. However, I've encountered an issue related to querying ingress and egress traffic values in Grafana. Here are the details of the problem:

Steps to Reproduce:

Add the following queries to the panel: Query 1: rate(ifHCOutOctets{instance="switch1", ifName="et-0/0/30"}[2m]) 8 Query 2: rate(ifHCInOctets{instance="switch1", ifName="et-0/0/30"}[2m]) 8 Assign the queries to a link.

Expected Behavior: The two queries above should correctly display different values for ingress and egress traffic. When testing these queries directly in Prometheus, they do indeed show different and accurate values for both inbound and outbound traffic.

Actual Behavior: However, when I use the same queries in Grafana and assign them to a link, both queries display the same value, and it appears to be showing only the value for ifHCOutOctets traffic. This behavior persists regardless of whether I use Victoria-metrics or Prometheus as the data source.

Question: Is there a way to set up the ifHCInOctets query? I need it to shows the traffic coming from our partners.

Thanks a lot!

jemcek commented 11 months ago

I have the same problem. Only the out octets are shown, even if the query is if_in_octets.

I create two queries, one with if_out_octets and one with if_in_octets. However, when I select the source inside the A side query and Z side query, there are two listed but have completely the same parameters (no in/out data).

This is not a problem if you can make the query from both sides with if_out_octets, but if you don't have access to remote side, then this does not work correctly.

knightss27 commented 11 months ago

Hi there! Can you look at issue #14 and let me know if this is the same problem? I can't exactly tell from your description if it is. If not then I'll try to take a look into this.

jemcek commented 11 months ago

Hi,

yes it is the same problem. I'm using VictoriaMetrics InfluxDB as datasource and if I change the Legend from Auto to Custom and add my link description then I can select the correct In/Out query at the link level.

This workaround works fine, maybe you should just add a note at the wiki. Thanks for your work, nice plugin.

knightss27 commented 11 months ago

Perfect! Yes, I will pin this issue since it has a descriptive title for others, and add it soon to the wiki's FAQ.