Grafana: How to configure Prometheus as a data source in Grafana
This documentation is part of the Using Prometheus guide. View the full guide here: How to configure Grafana to use Prometheus as a data source.
👋 Welcome to the Stackhero documentation!
Stackhero gives you a ready-to-use Grafana cloud environment built for quick setup and reliable performance:
- Unlimited users, dashboards, and alerts: scale your monitoring as needed, without artificial limits.
- Dedicated SMTP email server included, so you can send all the notifications you want, with no quotas to track.
- One-click plugin installation streamlines adding new features to Grafana.
- Built-in SSO support for
GitLab,GitHub,OAuth2provider. User management stays simple and secure.- One-click updates keep your Grafana instance current, with no downtime or maintenance hassle.
- Use your own custom domain with automated HTTPS provisioning for secure, branded access (for example, https://grafana.your-company.com).
- High performance and strong security are standard, running on your own private, dedicated infrastructure.
Get started faster and save setup time: a secure Grafana cloud hosting instance is ready in about 5 minutes.
Integrating Prometheus with Grafana enhances your ability to visualize metrics effectively. Follow this guide for a straightforward setup process.
Accessing the data source configuration
- Open the Grafana web user interface (UI).
- Navigate to
Configuration>Data Sources. - Click on
Add Data Source. - From the list of available sources, select
Prometheus.
Example of Prometheus configuration as data source
Configuring the Prometheus data source
Follow these steps to properly set up Prometheus as a data source:
- URL: Provide the Prometheus service URL, such as
https://<XXXXXX>.stackhero-network.comor your custom domain. - Authentication: Enable
Basic Auth, setadminas the username, and provide your Prometheus password. You can find this password in the Stackhero dashboard under the Prometheus service settings. - Scrape Interval: Ensure the
Scrape Intervalaligns with your Prometheus server configuration. The default is15sunless it has been adjusted.
After entering these details, click Save & Test to verify the connection is functional.