|
| 1 | +--- |
| 2 | +title: Using Grafana to analyze OpenTelemetry metrics |
| 3 | +intro: Monitor the health and performance of your instance using dashboards and metrics provided by the OpenTelemetry metrics stack. |
| 4 | +versions: |
| 5 | + feature: ghes-opentelemetry |
| 6 | +topics: |
| 7 | + - Enterprise |
| 8 | + - Fundamentals |
| 9 | + - Infrastructure |
| 10 | + - Monitoring |
| 11 | + - Performance |
| 12 | +type: how_to |
| 13 | +shortTitle: Using Grafana to analyze metrics |
| 14 | +contentType: other |
| 15 | +--- |
| 16 | + |
| 17 | +## Prerequisites |
| 18 | + |
| 19 | +OpenTelemetry metrics must be enabled on the instance. For configuration instructions, see [AUTOTITLE](/admin/monitoring-and-managing-your-instance/monitoring-your-instance/opentelemetry-metrics/configuring-opentelemetry-for-your-instance). |
| 20 | + |
| 21 | +## Navigating to the monitor dashboards |
| 22 | + |
| 23 | +{% data reusables.enterprise_site_admin_settings.access-settings %} |
| 24 | +{% data reusables.enterprise_site_admin_settings.management-console %} |
| 25 | +{% data reusables.enterprise_management_console.type-management-console-password %} |
| 26 | +1. Click the **Monitor** tab. |
| 27 | + |
| 28 | + |
| 29 | +### Metric labels |
| 30 | + |
| 31 | +The OpenTelemetry stack exporters automatically attach labels to metrics. Common labels are: |
| 32 | + |
| 33 | +* `job` — the name of the exporter that produced the metric |
| 34 | +* `instance` — the instance name from which the metric originated |
| 35 | + |
| 36 | +For some exporters (like `node_exporter` or `haproxy_exporter`), open-source documentation may be available by searching for the `job` label value. |
| 37 | + |
| 38 | +Label availability varies by exporter and metric. Some GitHub application-level metrics may provide fewer labels than infrastructure/exporter metrics, and labels are subject to change from version to version. |
| 39 | + |
| 40 | + |
| 41 | +## Inspecting panel queries |
| 42 | + |
| 43 | +> [!IMPORTANT] Pre-built dashboards can be opened and edited for inspection, but changes cannot be saved. Create a copy of a dashboard to apply and retain any customizations. |
| 44 | +
|
| 45 | +To understand which metrics and queries power a given panel, use the graph panel menu *(3 vertical dots)* when viewing a Grafana dashboard: |
| 46 | + |
| 47 | +* **Edit**: Opens the panel editor. This is the most direct way to review and adjust the queries that power the visualization. |
| 48 | +* **Explore**: Opens Grafana Explore with the panel’s queries pre-populated, allowing interactive analysis. |
| 49 | +* **Metrics Drilldown**: Opens a side panel for discovering related metrics and breaking down the metric by label values. |
| 50 | + |
| 51 | +## Exploring metrics in Grafana |
| 52 | + |
| 53 | +Grafana provides multiple ways to discover and analyze the metrics available on your instance. |
| 54 | + |
| 55 | +### Grafana Drilldown |
| 56 | + |
| 57 | +Grafana Drilldown provides a guided workflow to discover metrics by filtering on metric prefixes, labels, and label values. After selecting a metric, Grafana can break down the series by available label values. For example, `haproxy_backend_response_errors_total` can be grouped by proxy/back-end label values. |
| 58 | + |
| 59 | +### Grafana Explore |
| 60 | + |
| 61 | +Grafana Explore enables interactive analysis using PromQL (Prometheus Query Language), including a query builder that can help users discover available metrics and labels. |
| 62 | + |
| 63 | +Tips for working in Grafana Explore: |
| 64 | + |
| 65 | +* Use **Code mode's Metric browser** to discover metrics and labels. Selecting labels and label values can reveal associated metrics, and selecting a metric can reveal associated labels and label values. |
| 66 | +* After selecting a metric, switch to **Builder mode** for suggestions to refine the query. |
| 67 | +* Access additional operations via the **+ Operations** button. |
| 68 | +* Customize legend labels in the **Options** panel using the **Legend** setting, for example `{{<label_name>}}`. By default, Grafana assigns legend labels based on unique label sets. |
| 69 | + |
| 70 | +## Further reading |
| 71 | + |
| 72 | +* [AUTOTITLE](/admin/monitoring-and-managing-your-instance/monitoring-your-instance/opentelemetry-metrics/advanced-dashboards) |
| 73 | +* [AUTOTITLE](/admin/monitoring-and-managing-your-instance/monitoring-your-instance/about-the-monitor-dashboards#creating-new-dashboards) |
| 74 | +* [Get Started with Explore](https://grafana.com/docs/grafana/latest/visualizations/explore/get-started-with-explore/) in the Grafana documentation |
| 75 | +* [Promql - Querying Basics](https://prometheus.io/docs/prometheus/latest/querying/basics/) in the Prometheus documentation |
0 commit comments