This is documentation for the next version of Grafana documentation. For the latest stable release, go to the latest version.
Prometheus data source
Prometheus is an open source monitoring system and time series database that scrapes and stores metrics used for monitoring and alerting.
The Prometheus data source is preinstalled in Grafana, so you don’t need to install it manually. Write queries using PromQL in the query editor, or use Metrics Drilldown to explore metrics without writing queries. The Prometheus data source also works with other projects that implement the Prometheus querying API, including Grafana Mimir and Thanos.
Supported features
Get started
The following documents help you set up and use the Prometheus data source:
- Configure the Prometheus data source
- Prometheus query editor
- Template variables
- Annotations
- Alerting
- Troubleshooting
Additional features
After you configure the Prometheus data source, you can:
- Use Metrics Drilldown to browse and explore your Prometheus metrics without writing PromQL
- Use Explore to query data without building a dashboard
- Add transformations to manipulate query results
- Create recorded queries for pre-aggregated data
- Save and reuse PromQL queries across dashboards, Explore, and annotations with saved queries (available in Grafana Enterprise and Grafana Cloud)
- Build a wide variety of visualizations
Cloud-managed Prometheus services
Note
In Grafana 13, the core Prometheus data source no longer supports SigV4 (AWS) or Azure AD authentication. These authentication methods have been migrated to dedicated plugins:
- Amazon Managed Service for Prometheus: Use the Amazon Managed Service for Prometheus data source. For migration details, refer to AWS authentication (deprecated).
- Azure Monitor Managed Service for Prometheus: Use the Azure Monitor Managed Service for Prometheus data source. For migration details, refer to Azure authentication (deprecated).
Existing data sources using these methods are automatically migrated on startup.
Plugin updates
Grafana still ships with the Prometheus data source out of the box. It’s preinstalled in both Grafana OSS and Grafana Enterprise, so there’s nothing for you to install. Starting with Grafana v13.2, it’s packaged as a standalone plugin rather than built into the Grafana codebase, which means you can update the plugin as needed without waiting for a Grafana release. By default, Grafana checks the plugin catalog and installs the latest version on each server restart.
To adjust this behavior:
- Opt out of auto-updates: Set
preinstall_auto_updatetofalsein your configuration file. - Update manually: Update at any time from the Administration > Plugins page without restarting Grafana.
The standalone plugin requires Grafana 12.3.0 or later. The Prometheus data source bundled with Grafana 13.1 and earlier continues to work as before, and those versions aren’t affected by this change.
Users running Grafana 12.3.x through 13.1.x can install the standalone plugin from the plugin catalog if they want the latest features before upgrading to Grafana 13.2. To use the standalone plugin with Grafana 12.3.x through 13.1.x, add the following to your configuration file:
[plugin.prometheus]
as_external = true
[plugins]
; Install the latest version on startup:
preinstall_sync = prometheus
; Or install a specific version:
; preinstall_sync = prometheus@<version>
