Test the PostgreSQL monitoring connection

In this milestone, you verify that Grafana Alloy is successfully collecting PostgreSQL metrics and logs and sending them to your Grafana Cloud instance. Testing the connection ensures that your monitoring setup is working correctly before installing dashboards and alerts.

The PostgreSQL integration provides a built-in connection test feature that validates both the configuration and data flow to Grafana Cloud. You can also verify data collection by checking for PostgreSQL metrics in your Grafana Cloud instance.

To test the PostgreSQL monitoring connection, complete the following steps:

  1. On the PostgreSQL integration page in Grafana Cloud, scroll to the Test connection section.

  2. Click Test connection to validate that data is flowing from your PostgreSQL instance to Grafana Cloud.

  3. Wait for the connection test to complete. A successful test indicates that:

    • Grafana Alloy is running and configured correctly
    • PostgreSQL metrics are being collected
    • Data is reaching your Grafana Cloud instance
  4. To manually verify data collection, navigate to Explore in your Grafana Cloud instance.

  5. From the data source dropdown at the top-left, select your Prometheus data source where PostgreSQL metrics are stored.

  6. In the query editor, search for pg_up to verify that the PostgreSQL exporter is reporting the database status.

  7. Check that the metric returns a value of 1, indicating that PostgreSQL is up and responding to monitoring queries.

The connection test confirms that your PostgreSQL monitoring setup is working correctly and that metrics are flowing to Grafana Cloud.

In the next milestone, you install the pre-built PostgreSQL dashboards and alerts to start monitoring your database.


Troubleshooting

Explore the following troubleshooting topics if you need help:

Were you successful?


page 7 of 10