---
title: "Select PDC and test connection | Grafana Labs"
description: "Learn how to select a private data source connection"
---

# Select PDC and test connection

The private data source connect (PDC) feature allows you to establish a secure connection between Grafana Cloud and your Prometheus data source. Watch video -&gt;

If you don’t use PDC, your queries and data are transmitted over the public internet, exposing them to potential security risks.

> **Did you know?** We recommend that you create a private connection whenever you connect Grafana Cloud to an external data source.

In this milestone, you select an active PDC agent and test the connection to Grafana Cloud.

To select a PDC agent and test the connection, complete the following steps:

1. In the **Private data source connect** field, select the name of a PDC agent.
   
   > For the test connection to be successful, you must select a PDC agent that’s running.
2. Click **Save &amp; test**.
   
   When successful, you’ll see the message: `Successfully queried the Prometheus API.`

Next, you can start to visualize data by building a dashboard, or by querying data in the Explore view.

* * *

### Troubleshooting

Explore the following troubleshooting topics if you need help:

- [Received message “There was an error when testing this data source, please check PDC agent logs”](/docs/grafana-cloud/connect-externally-hosted/private-data-source-connect/scalability-and-security/#audit-activity-and-the-pdc-agent)
- [Received message “Unknown error host unreachable. There was an error returned querying the Prometheus API.”](/docs/grafana-cloud/connect-externally-hosted/private-data-source-connect/configure-pdc/#check-your-pdc-agent-configuration)

* * *

### More to explore (optional)

- [Create a private connection to a data source](/docs/learning-paths/private-data-source-connect/)
