docs/en/setup/backend/ui-grafana.md
SkyWalking provides PromQL Service, LogQL Service and TraceQL Service. You can choose Grafana as the SkyWalking UI. About the installation and how to use please refer to the official document.
Notice <1>, Gafana is AGPL-3.0 license, which is very different from Apache 2.0. Please follow AGPL 3.0 license requirements.
Notice <2>, SkyWalking always uses its native UI as first class. All visualization features are only available on native UI. Grafana UI is an extension on our support of PromQL APIs. We don't maintain or promise the complete Grafana UI dashboard setup.
In the data source config panel, choose the Prometheus and set the url to the OAP server address, the default port is 9090.
Before you start, please install the SkyWalking data source plugin.
In the data source config panel, choose the SkyWalking and set the url to the OAP server graphql service address, the default port is 12800.
In the data source config panel, choose the Loki and set the url to the OAP server address, the default port is 3100.
In the data source config panel, choose the Tempo and set the url to the full OAP trace API address, including the context path. The default port is 3200, for example http://<oap-host>:3200/skywalking for SkyWalking native trace or http://<oap-host>:3200/zipkin for Zipkin trace.
The SkyWalking native trace API context path is /skywalking, and the Zipkin trace API context path is /zipkin.
You can customize them via SW_TRACEQL_REST_CONTEXT_PATH_SKYWALKING and SW_TRACEQL_REST_CONTEXT_PATH_ZIPKIN respectively. If you customize either path, use the customized path in the Grafana Tempo data source URL.
Notice: The feature requires version Grafana 12 or later. And require disabling the Streaming option for the Tempo data source in the following configuration.
The following steps are the example of config a General Service dashboard:
General Service. A layer is recommended as a dashboard.After configure, you can select the service/instance/endpoint on the top of the dashboard:
The following contents show how to add several typical metrics panels. General settings:
Query options --> Min interval = 1m, because the metrics min time bucket in SkyWalking is 1m.service_apdex and Time series chart.Service, so add labels service and layer for match.Connect null values --> Always and Show points --> Always because when the query interval > 1hour or 1day SkyWalking return
the hour/day step metrics values.service_percentile and Time series chart.Service, add labels service and layer for match.
And it's a labeled value metric, add labels='0,1,2,3,4' filter the result label, and addrelabels='P50,P75,P90,P95,P99' rename the result label.Connect null values --> Always and Show points --> Always because when the query interval > 1hour or 1day SkyWalking return
the hour/day step metrics values.service_instance_cpm and Bar gauge chart.parent_service and layer for match, add top_n='10' and order='DES' filter the result.Calculation --> Latest*.Same as the Sort Metrics.
For now, SkyWalking support General Service and Service Mesh topology dashboards, the layer is GENERAL and MESH respectively.
The following configuration can reuse the above General Service dashboard and add a new variable Plugin_SkyWalking for the dashboard:
Layer and Service by the variables. If you want to show all services in this layer, set Service empty.Node Metrics and Edge Metrics which you want to show on the topology.The following steps are the example of config a log dashboard:
Create a dashboard named Log.
Configure variables for the dashboard:
Please make sure service_instance and endpoint variable enabled Include All option and set Custom all value to * or blank (typed by space button on the keyboard):
Tags variable is a little different from others, for more details, please refer Ad hoc filters:
After configure, you can select log query variables on the top of the dashboard:
The following steps show how to add a log panel.
Logs chart.Line limit value (The max number of logs to return in a query) and Order value (Determines the sort order of logs).service_instance & endpoint variable ref should use raw variable-format-options
to prevent it value be escaped.The following steps are the example of config a General Relation dashboard:
Create a dashboard named General Relation.
Configure variables for the dashboard:
After configure, you can select the service/instance/endpoint and the dest service/instance/endpoint on the top of the dashboard:
The following contents show how to add relation metric panels.
Query options, Connect null values, Show points and Returned Labels. Please refer Configure Metric Dashboards part.Layer, Dest Layer, Service and Dest Service by the variables. For service instance relation scope, extra set Service Instance and Dest Service Instance.
For endpoint relation scope, extra set Endpoint and Dest Endpoint.The following steps are an example of configuring a Trace dashboard for SkyWalking native trace:
Go to the Explore page, select the Tempo data source named SkyWalkingTraceQL (the name you configured). Add it to the dashboard and save it as SkyWalking Trace.
Configure variables for the dashboard:
Notice: The variables (Service/Instance/Endpoint) querying leverage the Prometheus data source SkyWalkingPromQL(DS_SW_Prometheus).
If you want the Service/Instance/Endpoint variables to support the All option,
enable Allow custom values and set Custom all value to * so it matches the backend wildcard.
The following steps show how to add a trace panel for SkyWalking native trace.
Choose Table chart or edit your saved panel.
Set Query type to Search and set the query condition to variables, such as Service Name to $Service.
Set other query conditions if needed.
Test query and save the panel.
If you click the trace ID on the trace panel, it will jump to the explore page and show the trace details.
Same as the SkyWalking native trace, but use the Zipkin Tempo data source you configured. The following are the variables and trace panel configuration screenshots for Zipkin trace:
SkyWalking community provides a preview site for services of General and Service Mesh layers from the demo environment.
You could take a glance through Preview metrics on Grafana of the demo deployment.
Notice, we don't provide all setups due to our monitoring target expanding fast. This demo is for helping you understand the above documents only.