grafana / grafana-polystat-panel

D3-Based hexagon layout multi-stat panel
Apache License 2.0
93 stars 29 forks source link

request: add value-mappings per override #217

Open jeremyschulman opened 2 years ago

jeremyschulman commented 2 years ago

Hi @briangann - Thank you SO MUCH for the time and efforts you put into this plugin. It is amazing and allows us to monitor complex sets of metrics in a hierarchal manner. The composite feature is brilliant.

My request is to add "value mapping" to each of the overrides. The use-case is I have many metrics that I roll into a composite. Those metrics include both enumerated values (0=ok, 1=warn), as well as numeric values (errors-per-second). I also have multiple enumerated value metrics; for example one metric 0=ok, 1=warn; and another metric where 1=ok, and 2=down. Presently when I use composites the values in the tooltips are showing the numeric values - because I am not using the global level value-mapping feature since the value mappings have different meanings in the different metric contexts.

Hopefully these screen shots are helpful to explain my use-case:

Here is a metric that would benefit from a range value mapping: image

Here is a metric of enumerated values: image

Here is another metric of enumerated values that have overlapping values with the first one.
image

I hope this request makes sense. I did not find a similar issue in the existing backlog; but if there is one, please let me know and I will follow it. I greatly appreciate your time and efforts to consider this feature request!

Thank you!

briangann commented 1 year ago

this does make sense - currently the only option is to have set of global value/rangemaps, and you run into the overlap issue.

I'll see if i can pull out the core valuemap code and place it inside the overrides. I can still leave the global in place for "ease" of use, but the override would take precedence.

I imagine it won't take very long to add this functionality now that whole v2 code base is in react, and we have good support re-using components.

A similar issue with v2 is that there is no way to remove the overrides the standard editor provides (I'm getting that fixed though!)