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

[Feature] Support for "Node Graph" panel

Open hyberdk opened this issue 4 years ago • 3 comments

Hi all,

I was wondering if there are support for the new Node Graph panel plugin in the clickhouse datasource?

This is the one that I am talking about: https://grafana.com/docs/grafana/latest/panels/visualizations/node-graph/

As far as I can see, there needs to be some special data frames returned. If there already are support, then do anyone have a working installation running or can you point to some better documentation than what is on the grafana.com docs?

Thanks a lot.

Esben

hyberdk avatar Jun 16 '21 13:06 hyberdk

@hyberdk thanks a lot for your reporting I will try add this functionality to next release

Slach avatar Jun 23 '21 02:06 Slach

@Slach that would be awesome, let me know if you need someone to test or something like that..

Unfortunately the languages you use in this project is not really my flavor, so help coding is not realistic ;-)

hyberdk avatar Jun 25 '21 07:06 hyberdk

Surprisingly, this actually works without any modifications in Grafana 8.1.0

Node Graph can be fed using two different table formatted (A,B) queries with the following mandatory fields in each:

  • nodes
    • id (distinct, unique)
    • title
    • mainStat (optional float metric)
  • edges
    • id (ie: concat(source,target))
    • source
    • target
    • mainStat (optional float metric)

Note all the objects in source + target edges must exist as node ids for the panel to work!

The full list of optional parameters is available here

image

lmangani avatar Jul 26 '21 21:07 lmangani