grafana-flowcharting icon indicating copy to clipboard operation
grafana-flowcharting copied to clipboard

Replace drawio label with value from corresponding metric

Open Zeddy- opened this issue 4 years ago • 4 comments

I have the following simple query: image

The metrics will range from 1000-2500 so 1500 different values / measurements.

I would like to map these values with a single rule to the floorplan. The idea would be to define the metric / attr as a label in drawio, and replace each label with the corresponding metrics value:

image

So for example i have these values for attr 1040: image

In this case i would want to take the latest value 23.45 and write it into the box.

I tried using regular expression but ended up writing 23.45 everywhere :D image

Zeddy- avatar Jan 05 '21 13:01 Zeddy-

First Hi, It's a table or a serie ? In your case, i think you need to create 1 Rule by metrics.

Br Arnaud

algenty avatar Jan 06 '21 16:01 algenty

Hi, and thank you for answering!

Its formatted as time series, but to be honest i don't even see the difference between that and table formatting?

Yes for now i created 1 rule per metric, but i was able to speed up the process substantially by editing the JSON source directly. I then used json-generator to generate 70 rules with correct metric to label mapping, and then copy pasted them into the JSON.

image

I can work with this, but it would be amazing to be able to something like this: image

Zeddy- avatar Jan 07 '21 10:01 Zeddy-

its already in progress, in next version, you can add ${_metric} in "what" field

Le jeu. 7 janv. 2021 à 11:26, Zeddy- [email protected] a écrit :

Hi, and thank you for answering!

Its formatted as time series, but to be honest i don't even see the difference between that and table formatting?

Yes for now i created 1 rule per metric, but i was able to speed up the process substantially by editing the JSON source directly. I then used json-generator to generate 70 rules with correct metric to label mapping, and then copy pasted them into the JSON.

[image: image] https://user-images.githubusercontent.com/1147662/103881424-15e41700-50e3-11eb-812a-1057eee16667.png

I can work with this, but it would be amazing to be able to something like this: [image: image] https://user-images.githubusercontent.com/1147662/103881753-8ee36e80-50e3-11eb-97e1-1632a33cb1b7.png

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/algenty/grafana-flowcharting/issues/261#issuecomment-756028613, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALGVW5MKIHAJWIFKWDOQXULSYWD6XANCNFSM4VVDBS2Q .

-- Arnaud GENTY Responsable et Ingénieur de production IT (SAP/J2EE). Tel : (+33)6.23.08.30.14 Email : [email protected]

algenty avatar Jan 10 '21 18:01 algenty

Great to hear! Thank you!

Zeddy- avatar Jan 13 '21 11:01 Zeddy-