Difference between revisions of "OS4X Grafana Integration"

From OS4X
Jump to navigation Jump to search
Line 1: Line 1:
 +
OS4X supports the integration of Grafana (when using the MySQL/MariaDB database backend). It helps you automated in these tasks:
 +
*check the authentication token
 +
*create and check the data source
 +
*create and check the dashboard
 +
*publishing the dashboard anonymously, to be embedded as an iframe in the OS4X admin panel
 +
 +
If one of these tasks has to be manually
 +
 
= Requirements =
 
= Requirements =
 
A Grafana server with installed MySQL Data Source plugin is required. For the configuration of the integration you need an API token with administrative permissions.
 
A Grafana server with installed MySQL Data Source plugin is required. For the configuration of the integration you need an API token with administrative permissions.
Line 8: Line 16:
 
  systemctl restart grafana-server.service
 
  systemctl restart grafana-server.service
  
= Coming soon =
+
= Authentication token =
''(t.b.d.)''
+
The dynamic setup of the Grafana data source, dashboard and panel requires an administrative API token. You can generate one in the Grafana admin interface in "Administration" -> "Users and access" -> "Service accounts". Pick an existing service account or create a new one with role "Admin". Add a service account token. The token is only required during setup and can be removed afterwards.
 +
 
 +
= OS4X configuration =
 +
Navigate to "Configuration" -> "Grafana" to setup the integration:
 +
 
 +
[[File:Bildschirmfoto 2025-11-28 um 14.26.39.png]]

Revision as of 13:27, 28 November 2025

OS4X supports the integration of Grafana (when using the MySQL/MariaDB database backend). It helps you automated in these tasks:

  • check the authentication token
  • create and check the data source
  • create and check the dashboard
  • publishing the dashboard anonymously, to be embedded as an iframe in the OS4X admin panel

If one of these tasks has to be manually

Requirements

A Grafana server with installed MySQL Data Source plugin is required. For the configuration of the integration you need an API token with administrative permissions.

Grafana server configuration

Since the panel is being embedded as an HTML iframe, the HTTP response header must not contain "X-Frame-Options: DENY". Change the Grafana configuration (default: /etc/grafana/grafana.ini) the following value:

allow_embedding = true

Restart Grafana afterwards:

systemctl restart grafana-server.service

Authentication token

The dynamic setup of the Grafana data source, dashboard and panel requires an administrative API token. You can generate one in the Grafana admin interface in "Administration" -> "Users and access" -> "Service accounts". Pick an existing service account or create a new one with role "Admin". Add a service account token. The token is only required during setup and can be removed afterwards.

OS4X configuration

Navigate to "Configuration" -> "Grafana" to setup the integration:

Bildschirmfoto 2025-11-28 um 14.26.39.png