External Integrations

External integrations allow you to connect your Exoscale DBaaS services with third-party monitoring, logging, or analytics tools.

Prerequisites

  • Exoscale CLI version 1.79.1 (can be done via the Exoscale Portal as well.)
  • If you need to install or upgrade, follow the Exoscale CLI installation guide.
  • Necessary permissions: Ensure you have the required permissions to manage integrations on the selected DBaaS service.
  • API credentials or endpoint details: Obtain the necessary API credentials or endpoint details for the external service you want to integrate (e.g., Datadog API key, Prometheus URL,…).

Step 1: Create an External Endpoint

Before attaching an external integration, you need to create an external endpoint. This endpoint represents the connection to the third-party service (e.g., Datadog, Prometheus).

Example: Create a Datadog Endpoint

Run the following command to create a Datadog endpoint:

exo dbaas external-endpoint create datadog datadog-endpoint --datadog-api-key eebc5889bae019cb758863df38b9a19a --datadog-site datadoghq.eu

Explanation of the Command

  • exo dbaas external-endpoint create datadog: Creates a Datadog endpoint.
  • datadog-endpoint: A human-readable name for the endpoint.
  • --datadog-api-key eebc5889bae019cb758863df38b9a19a: Your Datadog API key for authentication.
  • --datadog-site datadoghq.eu: Specifies the Datadog site (e.g., datadoghq.eu for EU region).

After running the command, you’ll receive an Endpoint ID (e.g., 2da0a841-5314-47f2-8bfe-2856acea17e0). Save this ID for the next step.

Step 2: Attach the External Integration

Once the endpoint is created, you can attach it to your DBaaS service using the exo dbaas external-integration attach command.

Example: Attach Datadog to a PostgreSQL Service

Run the following command to attach the Datadog integration to a PostgreSQL service named rocket-pg:

exo dbaas external-integration attach datadog --source-service-name rocket-pg --destination-endpoint-id 2da0a841-5314-47f2-8bfe-2856acea17e0

Result

The integration will be established, and your database service will send relevant metrics to Datadog. Verify the integration within your Datadog dashboard.

Step 3: Verify the Integration

After attaching the integration, verify its status by listing all external integrations for your DBaaS service:

exo dbaas external-integration list rocket-pg

This command will display a list of all external integrations attached to the rocket-pg service, including their status and endpoint details.

Step 4: Manage Datadog Integration Settings

You need to update the Datadog integration settings to enable advanced monitoring features like pg_stat and pgbouncer for PostgreSQL services.

Prerequisites for Advanced Monitoring

Enable Required Extensions: Ensure the following extensions are enabled in your PostgreSQL service:

CREATE EXTENSION pg_stat_statements;
CREATE EXTENSION aiven_extras;

Show Datadog Integration Settings

To view the current settings of a Datadog integration, use the following command:

exo dbaas external-integration settings show datadog 2875dd0e-2107-4c5d-93d2-1f7581860e1e

Replace 2875dd0e-2107-4c5d-93d2-1f7581860e1e with the actual integration UUID.

Enable Advanced Monitoring Features

To enable pg_stat and pgbouncer monitoring, update the Datadog integration settings with the following command:

exo dbaas external-integration settings update datadog 2875dd0e-2107-4c5d-93d2-1f7581860e1e --datadog-dbm-enabled true --datadog-pgbouncer-enabled true

Explanation of the Command

  • --datadog-dbm-enabled true: Enables Database Monitoring (DBM) for advanced metrics.
  • --datadog-pgbouncer-enabled true: Enables PgBouncer monitoring for connection pooling metrics.

Step 5: Detach an External Integration (Optional)

If you no longer need an external integration, you can detach it using the following command:

exo dbaas external-integration detach rocket-pg --integration-id 2875dd0e-2107-4c5d-93d2-1f7581860e1e

Supported External Integrations

Exoscale DBaaS supports the following external integrations:

  • Datadog: For monitoring and analytics.
  • Rsyslog: For log forwarding.
  • Prometheus: For time-series monitoring.
  • Elasticsearch: For log and event data analysis.
  • OpenSearch: For search and analytics.

Example configuration for Prometheus

  1. Create an Endpoint for Prometheus Integration
  • Name can be anything, it doesn’t need to be the Prometheus URL.
  • Username is the Username which will be later be used to scrape the data from DBaaS.
  • Password is the Password which will be later be used to scrape the data from DBaaS. Please store the password as you can’t retrieve it later.
  1. Attach the new Endpoint to your DBaaS Service
  2. Get the CA certifcate from the DBaaS Service from the connection details and transfer it to your prometheus instance.
  3. Get the prometheus URI for the DBaaS Service from the connection details.
  4. Add the IP from Prometheus to the IP Filter for the DBaaS Service.
  5. Add scrape info to Prometheus
  - job_name: aivenmetrics
    scheme: https
    basic_auth:
      username: "<Username from Step 1>"
      password: "<Password from Step 1>"
    tls_config:
      ca_file: <Reference to the ca.pem file from Step 3>
    static_configs:
      - targets: ["<Prometheus URI - without HTTPS://>"]

Troubleshooting

If you encounter issues while creating endpoints or attaching integrations:

  • Verify that you have the necessary permissions and correct API credentials or endpoint details.
  • Check the Exoscale Platform Status page for any ongoing incidents.

For further assistance, contact Exoscale Support Plans.