blob: ff053396fee9e6ec510f558867179aa512358839 [file] [log] [blame]
// monitoring-{prod-id-short}
[id="developing-grafana-dashboards_{context}"]
= Developing Grafana dashboards
Grafana offers the possibility to add custom panels.
.Procedure
To add a custom panel, use the *New dashboard* view.
. In the first section, define *Queries to*. Use the _Prometheus Query Language_ to construct a specific metric, as well as to modify it with various aggregation operators.
+
.New Grafana dashboard: Queries to
image::monitoring/monitoring-che-new-grafana-dashboard-queries.png[link="{imagesdir}/monitoring/monitoring-che-new-grafana-dashboard-queries.png"]
. In the *Visualisation* section, choose a metric to be shown in the following visual in the form of a graph, gauge, heatmap, or others.
+
.New Grafana dashboard: Visualization
image::monitoring/monitoring-che-new-grafana-dashboard-visualization.png[link="{imagesdir}/monitoring/monitoring-che-new-grafana-dashboard-visualization.png"]
. Save changes to the dashboard by clicking the btn:[Save] button, and copy and paste the JSON code to the deployment.
. Load changes in the configuration of a running Grafana deployment. First remove the deployment:
+
----
$ oc process -f che-monitoring.yaml | oc delete -f -
----
+
Then redeploy your Grafana with the new configuration:
+
----
$ oc process -f che-monitoring.yaml | oc apply -f - | oc rollout latest grafana
----
// [discrete]
// == Additional resources
//
// * A bulleted list of links to other material closely related to the contents of the procedure module.
// * For more details on writing procedure modules, see the link:https://github.com/redhat-documentation/modular-docs#modular-documentation-reference-guide[Modular Documentation Reference Guide].
// * Use a consistent system for file names, IDs, and titles. For tips, see _Anchor Names and File Names_ in link:https://github.com/redhat-documentation/modular-docs#modular-documentation-reference-guide[Modular Documentation Reference Guide].