Reputation: 829
I am trying to generate a directed node graph using Grafana (latest). I hardly see any tutorials anywhere.
I can expose an API which reads JSON data from disk and gives it to Grafana which can display the graph. I don't know how the JSON should look like so that Grafana can print the node graph. There is hardly any help on this on Google. I have tried to use d3js; but it's learning curve is very high and I can't get something working quickly.
Are there any tutorials or samples with Grafana integrated with some custom API to generate node graph?
Upvotes: 2
Views: 7365
Reputation: 51
You have 1-Graph Node Panel 2-Graph Node API
The API is needed an an example only to show how you can feed data. You can also use a normal Database. Create two tables one for nodes and other for edges. table columns should be as the API documentation. Then formulate two queries while you create you panel same way for each nodes and edges tables. Graph Node Panel will be able to form the graph using this approach.
Upvotes: 0
Reputation: 517
Have you looked at the following links?
Node Graph documentation - https://grafana.com/docs/grafana/latest/visualizations/node-graph/#data-api
Datasource which can connect to your REST APIs and convert into whatever node graph likes - https://github.com/hoptical/nodegraph-api-plugin
Here is how I could create a simple node graph using testDataDB csv content data source -
It will be displayed as follows -
Upvotes: 3