Sobes.tech
Junior — Middle

Kuidas toimub andmete ühendamine ja kuvamine Grafanas?

sobes.tech AI

Vastus AI-lt

In Grafana, data connection and visualization are done through Data Sources. First, a data source is added in the Grafana interface — this can be a database, monitoring system, or API (e.g., Prometheus, InfluxDB, MySQL, etc.).

After connecting the data source, dashboards with panels are created; in each panel, a query is written to the data source to obtain the necessary metrics or data. Grafana executes the queries, receives the data, and visualizes it in the form of graphs, tables, and other formats.

Example: connecting to Prometheus and displaying the CPU usage metric.

# In the Grafana UI, add the Prometheus data source with the server URL

In the dashboard panel, write the PromQL query:

node_cpu_seconds_total{mode="idle"}

Grafana executes the query, receives the data, and displays the CPU usage graph.