Menu
Grafana Cloud Quickstarts Get started with an existing data source
Grafana Cloud

Get started with an existing data source

Add a data source to your Grafana Cloud account to quickly connect to existing data, such as InfluxDB or CloudWatch.

Before you begin

Ensure you have the following:

  • A Grafana Cloud account. To create an account, visit Grafana Cloud and click Start for free
  • A Grafana Cloud user with the Admin role
  • A supported data source

For more details about data sources, see:

Sample data sources

If you do not have an existing data source, you can add the TestDB data source to generate simulated time series data.

The Grafana Cloud fundamentals tutorial also provides an example Prometheus and Loki data source that you can add to your Grafana Cloud account to query and visualize sample data.

Add a data source

  1. Log in to Grafana.com to access your Cloud Portal.

  2. Click Launch in the Grafana tile to access your hosted Grafana environment. The first time you log in to Grafana from the Cloud Portal you are automatically taken to a walkthrough where you can select a data source. If this is the first time logging in, following the walkthrough will skip the next two steps listed below. Otherwise, proceed to the next step in this guide.

  3. Click Administration in the left-side menu and select Data sources.

    This opens the data sources page, which displays a list of configured data sources for the Grafana environment.

  4. Select Add new data source to see a list of all supported data sources.

  5. Enter the name of a specific data source in the search field or scroll through the list of supported data sources grouped into time series, logging, tracing, and other categories.

  6. Move the cursor over the data source you want to add and click on it to select.

    This opens the data source configuration page.

Configure the data source

  1. Configure the data source following instructions specific to that data source.

    For links to data source-specific documentation, see Data sources.

    NOTE: Grafana Cloud connects to your data source over the public network. Local addresses will not resolve properly.

  2. After saving the data source configuration details, use the Save & test button to test connectivity between Grafana Cloud and your data source.

Troubleshoot Connectivity Issues

Hostname resolution

Grafana Cloud connects to your data source over the public network. This means that host addresses such as “localhost” or a private network IP address cannot be resolved. Enter the fully qualified domain name or public IP address for the data source hostname to ensure successful communication. Depending on your network security settings, you may need to add the Hosted Grafana source IP addresses to your allowlist:

Hosted Grafana

  • JSON format: /api/hosted-grafana/source-ips
  • Text format: /api/hosted-grafana/source-ips.txt
  • DNS lookup: src-ips.hosted-grafana.grafana.net

For more details, see List of source IPs to add to your allowlist

User Credentials

Some data sources require user credentials to query the data. Ensure that the user credentials provided in the data source have sufficient permissions to access the data source following the principle of least privilege.

For example, the MySQL data source requires database user credentials. The database user you specify should only be granted SELECT permissions on the specified database and tables you want to query. Grafana does not validate that the query is safe. The query could include any SQL statement. For example, statements like USE otherdb; and DROP TABLE user; would be executed. To protect against this we highly recommend you create a specific mysql user with restricted permissions.

Next Steps

Once the data source has been added and saved successfully, you are ready to build a dashboard or query this data source in Explore. The query language and options will be specific to each data source.

For other options to work with your data in Grafana Cloud, see Connect your data to Grafana Cloud

Learn more about dashboards