NodeGopher is a Grafana/Prometheus NodeGraph helper It builds nodegraph structure by merging static data and metrics pulled from prometheus instance
Go to file
2025-01-12 21:15:31 +01:00
docs Update screen cap & unit in config.yaml.sample 2025-01-12 21:10:59 +01:00
.gitignore Change sample name, praise syntax coloration god 2025-01-12 21:15:13 +01:00
config.sample.yaml Change sample name, praise syntax coloration god 2025-01-12 21:15:31 +01:00
edges.go v.0.2.3: Add thicknessquery and highlightedquery. Add human readable formatting for main|secondarystats 2025-01-12 21:00:25 +01:00
go.mod v.0.2.1 2025-01-12 14:59:32 +01:00
go.sum v.0.2.1 2025-01-12 14:59:32 +01:00
main.go v.0.2.3: Add thicknessquery and highlightedquery. Add human readable formatting for main|secondarystats 2025-01-12 21:00:25 +01:00
nodes.go v.0.2.3: Add thicknessquery and highlightedquery. Add human readable formatting for main|secondarystats 2025-01-12 21:00:25 +01:00
README.md Update README 2025-01-12 15:15:22 +01:00

NodeGopher

is a Node Graph Grafana/Prometheus helper

Its purpose in life is to help you create NodeGraphs like network or application topology, arranging nodes and edges, and dynamically query prometheus to add stat to graph items.

It support instant and range queries. Range query results will be averaged to get one metric.

Technically, it is an API which builds json nodegraph structure to be exposed to grafana. To enrich this structure with metrics, nodegopher query a prometheus instance.
It gets time range values from Grafana, so it can relay them to prometheus if you want to average values from a time range.

Configuration

see config.yaml.sample

Grafana datasource

Successfully tested with yesoreyeram-infinity-datasource datasource

Create an infinity query, name it "Edges". Type "JSON", Parser "Backend", Source "URL", Format "Table", Method "GET"
URL: "http://my-nodegopher-host:8080/graph1/edges?from=$__from&to=$__to&interval=$__interval"

Edges configuration

Create a second infinity query named "Nodes", same config,
URL: "http://my-nodegopher-host:8080/graph1/nodes?from=$__from&to=$__to&interval=$__interval"

switch to visualization type "NodeGraph", and voila

NodeGraph sample

Instance management

Reload configuration

You can reload configuration file when the API is running, with either sending a signal, or make a POST request.

Using SIGHUP :

kill -HUP `pgrep nodegopher`

Sending POST on /reload :

curl -XPOST http://my-nodegopher-host:8080/reload
{"message":"configuration successfully reloaded"}