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
139 stars 7 forks source link

Link side queries duplicates/merges when using SNMP ifInOctets and ifOutOctets #14

Closed ghost closed 2 years ago

ghost commented 2 years ago

Describe the problem Works as expected when working with queries from Netdata metrics that has their own dimension for received and sent. However when using SNMP where there is a different base query (ifInOctets vs ifOutOctets) the query link side suggester only shows the same result for both sides even with 2 queries.

Also I checked in the Explore to confirm both Datasets are not wide.

To Reproduce Steps to reproduce the behavior (if possible):

  1. Add SNMP datasource (e.g Prometheus SNMP exporter)
  2. Query the data
  3. Add nodes and links
  4. Select query for link sides
  5. See that it only shows duplicate

Expected behavior Expected to get the similar approach as when using Netdata metrics.

Screenshots If applicable, add screenshots to help explain your problem.

Dataset:

image

Bug:

image

How it should be:

image

VERSIONS! (please complete the following information):

Additional context Add any other context about the problem here.

knightss27 commented 2 years ago

Hey there,

First, thanks for using the bug issue formatting!

Second, can you try changing the legend formatting for each of those queries so that they are different? This might be as simple as just adding a "sent"/"received" to the end of the current legend string in the queries' options.

I think this is happening because both queries end up having the exact same legend name, thus the Select component for choosing them gets confused and only ever chooses the first one. Adding those different labels should hopefully fix this. I should look into fixing this but it is also kind of Grafana's fault for how they designed their component.

Let me know if this helps!

ghost commented 2 years ago

Thanks this resolved it, and thanks for a great plugin!