---
title: "List Logsinks for a Database Cluster"
method: GET
path: "/v2/databases/{database_cluster_uuid}/logsink"
tags: ["DigitalOcean-public.v2-new_Databases"]
---

# List Logsinks for a Database Cluster

`GET /v2/databases/{database_cluster_uuid}/logsink`

To list logsinks for a database cluster, send a GET request to
`/v2/databases/$DATABASE_ID/logsink`.

## Path parameters

- `database_cluster_uuid` string, uuid, required

## Response `201`

A JSON object with a key of `sinks`.

- object
  - `sinks` LogsinkVerbose[]
    - `sink_id` string — A unique identifier for Logsink
    - `sink_name` string — The name of the Logsink
    - `sink_type` 'rsyslog' | 'elasticsearch' | 'opensearch'
    - `config` union
      - RsyslogLogsink
        - `server` string, required — DNS name or IPv4 address of the rsyslog server
        - `port` integer, required — The internal port on which the rsyslog server is listening
        - `tls` boolean, required — Use TLS (as the messages are not filtered and may contain sensitive information, it is highly recommended to set this to true if the remote server supports it)
        - `format` 'rfc5424' | 'rfc3164' | 'custom', required — Message format used by the server, this can be either rfc3164 (the old BSD style message format), `rfc5424` (current syslog message format) or custom
        - `logline` string — Conditional (required if `format` == `custom`). Syslog log line template for a custom format, supporting limited rsyslog style templating (using `%tag%`). Supported tags are: `HOSTNAME`, `app-name`, `msg`, `msgid`, `pri`, `procid`, `structured-data`, `timestamp` and `timestamp:::date-rfc3339`. --- **Datadog Integration Example for Non-Mongo clusters**: ``` DD_KEY <%pri%>1 %timestamp:::date-rfc3339% %HOSTNAME%.DB_NAME %app-name% - - - %msg% ``` - Replace `DD_KEY` with your actual Datadog API key. - Replace `DB_NAME` with the actual name of your database cluster. - Configure the Server: - US Region: Use `intake.logs.datadoghq.com` - EU Region: Use `tcp-intake.logs.datadoghq.eu` - Configure the Port: - US Region: Use port `10516` - EU Region: Use port `443` - Enable TLS: - Ensure the TLS checkbox is enabled. - Note: This configuration applies to **non-Mongo clusters only**. For **Mongo clusters**, use the `datadog_logsink` integration instead.
        - `sd` string — content of the structured data block of rfc5424 message
        - `ca` string — PEM encoded CA certificate
        - `key` string — (PEM format) client key if the server requires client authentication
        - `cert` string — (PEM format) client cert to use
      - ElasticsearchLogsink
        - `url` string, required — Elasticsearch connection URL
        - `index_prefix` string, required — Elasticsearch index prefix
        - `index_days_max` integer — Maximum number of days of logs to keep
        - `timeout` number, float — Elasticsearch request timeout limit
        - `ca` string — PEM encoded CA certificate
      - OpensearchLogsink
        - `url` string, required — Opensearch connection URL
        - `index_prefix` string, required — Opensearch index prefix
        - `index_days_max` integer — Maximum number of days of logs to keep
        - `timeout` number, float — Opensearch request timeout limit
        - `ca` string — PEM encoded CA certificate
      - DatadogLogsink — Configuration for Datadog integration **applicable only to MongoDB clusters**.
        - `site` string, required — Datadog connection URL
        - `datadog_api_key` string, required — Datadog API key

## Other responses

- `401` — Authentication failed due to invalid credentials.
- `404` — The resource was not found.
- `429` — The API rate limit has been exceeded.
- `500` — There was a server error.
- `default` — There was an unexpected error.

---

[API](https://skmtc.net/digitalocean/apis/digitalocean-api.md) · [All operations](https://skmtc.net/digitalocean/apis/digitalocean-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/digitalocean/digitalocean-api/versions/cb3bf9b21459/schema)
