instruction: Create automated Grafana dashboards for Grafana support for Prometheus | Prometheus Prometheus Docs Download Community Support &amp; Trainin...
output: Grafana support for Prometheus | Prometheus Prometheus Docs Download Community Support &amp; Training Blog Ctrl + K Show nav Introduction Overview First steps Comparison to alternatives FAQ Roadmap Design documents Media Glossary Long-term support Concepts Data model Metric types Jobs and instances Prometheus Server Getting started Installation Configuration Configuration Recording rules Alerting rules Template examples Template reference Unit testing for rules HTTPS and authentication Querying Basics Operators Functions Examples HTTP API Remote Read API Storage Federation HTTP SD Management API Command Line prometheus promtool Migration API stability Feature flags Visualization Expression browser Grafana Perses Console templates Instrumenting Client libraries Writing client libraries Pushing metrics Exporters and integrations Writing exporters Exposition formats UTF-8 escaping schemes Content negotiation Operating Security Integrations Alertmanager Alerting overview Alertmanager Configuration Clients Notification template reference Notification template examples Management API HTTPS and authentication Best practices Metric and label naming Consoles and dashboards Instrumentation Histograms and summaries Alerting Recording rules When to use the Pushgateway Remote write tuning Guides Basic auth Monitoring Docker container metrics using cAdvisor Use file-based service discovery to discover scrape targets Instrumenting a Go application Understanding and using the multi-target exporter pattern Monitoring Linux host metrics with the Node Exporter OpenTelemetry UTF-8 in Prometheus Docker Swarm Query log TLS encryption Tutorials Getting started with Prometheus Understanding metric types Instrumenting HTTP server written in Go Visualizing metrics using Grafana Alerting based on metrics Specifications Native Histograms [EXPERIMENTAL] OpenMetrics 1.0 Remote Write 1.0 2.0 Grafana support for Prometheus Grafana is an open-source analytics and visualization platform used to monitor and analyze metrics from various data sources. It allows users to create, explore, and share interactive dashboards, supporting integrations with databases like Prometheus, InfluxDB, Elasticsearch, and more. Grafana is widely used for observability, providing alerting, plugin extensibility, and a flexible query editor for real-time data visualization. Note: The Grafana data source for Prometheus is included since Grafana 2.5.0 (2015-10-28). The following shows an example Grafana dashboard which queries Prometheus for data: Installing To install Grafana see the official Grafana documentation . Using By default, Grafana will be listening on http://localhost:3000 . The default login is &quot;admin&quot; / &quot;admin&quot;. Creating a Prometheus data source To create a Prometheus data source in Grafana: Click on the &quot;cogwheel&quot; in the sidebar to open the Configuration menu. Click on &quot;Data Sources&quot;. Click on &quot;Add data source&quot;. Select &quot;Prometheus&quot; as the type. Set the appropriate Prometheus server URL (for example, http://localhost:9090/ ) Adjust other data source settings as desired (for example, choosing the right Access method). Click &quot;Save &amp; Test&quot; to save the new data source. The following shows an example data source configuration: Creating a Prometheus graph Follow the standard way of adding a new Grafana graph. Then: Click the graph title, then click &quot;Edit&quot;. Under the &quot;Metrics&quot; tab, select your Prometheus data source (bottom right). Enter any Prometheus expression into the &quot;Query&quot; field, while using the &quot;Metric&quot; field to lookup metrics via autocompletion. To format the legend names of time series, use the &quot;Legend format&quot; input. For example, to show only the method and status labels of a returned query result, separated by a dash, you could use the legend format string {{method}} - {{status}} . Tune other graph settings until you have a working graph. The following shows an example Prometheus graph configuration: In Grafana 7.2 and later, the $__rate_interval variable is recommended for use in the rate and increase functions. Importing pre-built dashboards from Grafana.com Grafana.com maintains a collection of shared dashboards which can be downloaded and used with standalone instances of Grafana. Use the Grafana.com &quot;Filter&quot; option to browse dashboards for the &quot;Prometheus&quot; data source only. You must currently manually edit the downloaded JSON files and correct the datasource: entries to reflect the Grafana data source name which you chose for your Prometheus server. Use the &quot;Dashboards&quot; → &quot;Home&quot; → &quot;Import&quot; option to import the edited dashboard file into your Grafana install. Previous Expression browser Edit Edit this page Next Perses On this page © Prometheus Authors 2014- 2025 | Documentation Distributed under CC-BY-4.0 © 2025 The Linux Foundation. All rights reserved. The Linux Foundation has registered trademarks and uses trademarks. For a list of trademarks of The Linux Foundation, please see our Trademark Usage page.