Integrating an external Grafana instance
Neutree includes a built-in Grafana instance for monitoring and visualizing system metrics. However, you may want to use an existing external Grafana instance to centrally manage monitoring data from multiple systems.
Step 1: Configure the external Grafana instance for anonymous access and UI embedding
Section titled “Step 1: Configure the external Grafana instance for anonymous access and UI embedding”The external Grafana instance must support anonymous access and UI embedding before Neutree can embed Grafana dashboards in the management interface.
-
Edit the Grafana configuration file (typically
grafana.inior configured via environment variables). -
Enable anonymous access:
[auth.anonymous]enabled = true -
Allow UI embedding:
[security]allow_embedding = true -
Restart the Grafana service for the configuration to take effect.
Step 2: Add the Neutree metric data source in external Grafana
Section titled “Step 2: Add the Neutree metric data source in external Grafana”Configure the external Grafana data source to point to the Prometheus metric endpoint configured in Neutree.
-
Log in to the external Grafana management interface and navigate to Configuration (or Connections in some versions) > Data Sources.
-
Click Add data source and select Prometheus.
-
Configure the data source parameters:
Parameter Description Name Data source name. Must be neutree-cluster.URL Prometheus service address configured in Neutree, for example: http://<prometheus-host>:9090. -
Click Save & Test to verify the connection.
Step 3: Import Neutree dashboards
Section titled “Step 3: Import Neutree dashboards”Neutree provides pre-configured Grafana dashboards for displaying key system metrics.
-
Use the Neutree CLI tool to obtain the dashboard configuration files.
Run the following command to export the dashboard configuration files:
Terminal window neutree-cli-<arch> launch obs-stack --dry-runThe exported dashboard configuration files are located in the
neutree-deploy/obs-stack/grafana/dashboardsdirectory:Terminal window tree neutree-deploy/obs-stack/grafana/dashboardsThe directory structure is as follows:
neutree-deploy/obs-stack/grafana/dashboards├── data_grafana_dashboard.json├── dcgm_exporter_dashboard.json├── default_grafana_dashboard.json├── node_exporter_dashboard.json├── overview_dashboard.json├── router_dashboard.json├── serve_deployment_grafana_dashboard.json├── serve_grafana_dashboard.json└── vllm_grafana_dashboard.json -
Import the dashboards in Grafana.
-
Log in to the external Grafana management interface and navigate to Dashboards > Import.
-
Click Upload JSON file and select the downloaded dashboard JSON file, or paste the JSON content directly.
-
Complete the following configuration in the import settings:
- Name: Keep the default dashboard name.
- Folder: Select or create a folder to organize dashboards (for example:
Default).
-
Click Import to complete the import.
-
-
Repeat the above steps to import the other dashboard files.
Step 4: Configure the external Grafana URL in Neutree
Section titled “Step 4: Configure the external Grafana URL in Neutree”Choose the appropriate method based on your Neutree deployment to configure the external Grafana URL so that dashboards can be embedded in the Neutree management interface:
-
For Docker Compose deployments, use
launch --grafana-urlto set the external Grafana URL. -
For Kubernetes deployments, refer to the Modifying monitoring component configuration section to update Grafana-related configuration, disable the built-in Grafana, and set
system.grafana.urlto the external Grafana URL.
Step 5: Verify the configuration
Section titled “Step 5: Verify the configuration”-
Access external Grafana and confirm that the Neutree dashboards display data correctly.
-
Log in to the Neutree management interface and verify that the monitoring page correctly embeds and displays the external Grafana dashboards.