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

Link Tooltop Scaling & Timerange #50

Open phoenix1589 opened 1 year ago

phoenix1589 commented 1 year ago

Describe the problem The tooltip graph for the link scales to the maximum bandwidth of the link, rather than the maximum bandwidth used over the time period. For links with low utilization, no detail can be ascertained.

Also, the tooltip graph time range is of the time period set in the dashboard (fine) however the data points taken to create the weathermap itself is from the start time. If I want the tooltip graph to show the last 24 hours then the weathermaps themselves show data from yesterday - rather than .

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

  1. Set time window for last 24 hours
  2. Hover over a graph with low utilisation

Expected behavior The tooltip graph should scale to the max bandwidth observed during the time window selected (as a regular time series graph does).

The weathermap link bandwidth/colour scale should be based on the last value in the time range, rather than the first.

Screenshots image

For the last 6 hours to get a tooltip range that has some context, (it's currently 14:48), the weathermap itself is showing data from 08:48 this morning.

VERSIONS! (please complete the following information):

Additional context Add any other context about the problem here.

knightss27 commented 1 year ago

Are you positive the data is actually being showed in the wrong order? I've checked my code and it looks like I'm actually just using the wrong value to generate the timestamp (but the data is actually the same). I'll push a fix for this quickly if this is the case. I'm also looking into having the graph scale better.

phoenix1589 commented 1 year ago

Thanks for looking at this. Changing the time window duration does change the current value and based on the timestamp in the map I was presuming it was to the data at that time.

I've found a link which has significantly different usage this time yesterday and you are correct, the data shown is the end time of the window. There does seem to be a little deviation if I change between from: now-<x> to:now and from: now-<y> to:now e.g. image image

however changing back and forth quickly doesn't always result in a different value shown - so maybe I'm actually catching the data change and was wrongly attributing it to be <from> time (sorry).