Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposing support for many metrics per node / edge #206

Open
ivlcic opened this issue Jun 8, 2021 · 5 comments
Open

Proposing support for many metrics per node / edge #206

ivlcic opened this issue Jun 8, 2021 · 5 comments

Comments

@ivlcic
Copy link

ivlcic commented Jun 8, 2021

Hi,

We have to show more than one independent metric in a single node and edge.

I made a demo version where you can add metric name as a variable and use it in node/edge labels.

This demo solution is somewhat hackish, so I'll attach it here instead of a pull request.

grafana-diag-label-prop

updateDiagramStyle.ts

@SN4K3D
Copy link

SN4K3D commented Sep 24, 2021

Hi , yes i need me too the multiple metrics in one node !! because i have one database but multiple node in diagram
image

@ivlcic
Copy link
Author

ivlcic commented Sep 27, 2021

dist.zip

Here is my temporary "patched" version. I hope it helps.

I use it with Grafana v7.5.4 (615c153b3a) in production.

You can create "default" query value node as usual and add additional numbers to node text:

Example Re-e_fail, Re-e_in, Re-e_out, Re-i_in, ... are all "query names"/"query result names" in grafana.

Re-e_fail is the default query value that renders node color. $__Re-e_in is a reference to Re-e_in named query result value.

graph TD

%% ...

%% sample node:
Re-e_fail[(Reception <br />_n_ in: $__Re-e_in / out: $__Re-e_out / in dup: $__Re-i_in <br />_n_ failed: $__Re-e_fail / errors: $__Re-err)]

%% sample edge (link)
HFe-e_fail -- Opoint: $__Re-opo-e_in <br />_n_ STA: $__Re-sta-e_in ------> Re-e_fail

%% "<br />_n_" is forced new line

graf-diag

Just a side node: Use short query name / result name strings for template, since node sizing is computed on template names, not values so node size can get unreasonably big. (values are replaced afterwards so sizes are not adjusted to resulting text)

@cbryant42
Copy link

Would love if this could become official.

@ivlcic
Copy link
Author

ivlcic commented Dec 11, 2021

yeah ... me too.

@vb8448
Copy link

vb8448 commented Apr 12, 2024

Hi, is there any plan to incorporate the change? Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants