Use Grafana As The UI
Since 9.4.0, SkyWalking provide PromQL 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.
Configure Data Source
In the data source config panel, chose the Prometheus
and set the url to the OAP server address, the default port is 9090
.
Configure Dashboards
Dashboards Settings
The following steps are the example of config a General Service
dashboard:
- Create a dashboard named
General Service
. A layer is recommended as a dashboard. - Configure variables for the dashboard: After configure, you can select the service/instance/endpoint on the top of the dashboard:
Add Panels
The following contents show how to add several typical metrics panels. General settings:
- Chose the metrics and chart.
- Set
Query options --> Min interval = 1m
, because the metrics min time bucket in SkyWalking is 1m. - Add PromQL expressions, use the variables configured above for the labels then you can select the labels value from top. Note: Some metrics values may be required calculations to match units.
- Select the returned labels you want to show on panel.
- Test query and save the panel.
Common Value Metrics
- For example
service_apdex
andTime series chart
. - Add PromQL expression, the metric scope is
Service
, so add labelsservice
andlayer
for match. - Set
Connect null values --> Always
andShow points --> Always
because when the query interval > 1hour or 1day SkyWalking return the hour/day step metrics values.
Labeled Value Metrics
- For example
service_percentile
andTime series chart
. - Add PromQL expressions, the metric scope is
Service
, add labelsservice
andlayer
for match. And it’s a labeled value metric, addlabels='0,1,2,3,4'
filter the result label, and addrelabels='P50,P75,P90,P95,P99'
rename the result label. - Set
Connect null values --> Always
andShow points --> Always
because when the query interval > 1hour or 1day SkyWalking return the hour/day step metrics values.
Sort Metrics
- For example
service_instance_cpm
andBar gauge chart
. - Add PromQL expressions, add labels
parent_service
andlayer
for match, addtop_n='10'
andorder='DES'
filter the result. - Set the
Calculation --> Latest*
.
Sampled Records
Same as the Sort Metrics.
Preview on demo.skywalking.a.o
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.