[ Web Proxy ]
URL:
Viewing: https://docs.digitalocean.com/reference/pydo/reference/databases/update_logsink/ [Back]  [Original]

pydo.databases.update_logsink() | DigitalOcean Documentation

For AI agents: The documentation index is at https://docs.digitalocean.com/llms.txt. Markdown versions of pages use the same URL with index.html.md in place of the HTML page (for example, append index.html.md to the directory path instead of opening the HTML document).

pydo.databases.update_logsink()

Generated on 3 Aug 2026 from pydo version v0.40.0

Copy page as Markdown View page as Markdown

Usage

client.databases.update_logsink(
    database_cluster_uuid="9cc10173-e9ea-4176-9dbc-a4cee4c4ff30",
    logsink_id="50484ec3-19d6-4cd3-b56f-3b0381c289a6",
    body={
        "config": {...},
    },
)
Returns NoneRaises HttpResponseError

Description

To update a logsink for a database cluster, send a PUT request to /v2/databases/{database_cluster_uuid}/logsink/{logsink_id}.

Parameters

database_cluster_uuid string required

A unique identifier for a database cluster.

logsink_id string required

A unique identifier for a logsink of a database cluster

config object required
Show child properties
server string optional

Example: 192.168.0.1

DNS name or IPv4 address of the rsyslog server

port integer optional

Example: 514

The internal port on which the rsyslog server is listening

Max: 65535

tls boolean optional

Example: False

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 string optional

Message format used by the server, this can be either rfc3164 (the old BSD style message format), rfc5424 (current syslog message format) or custom

One of: rfc5424, rfc3164, custom

logline string optional

Example: <%pri%>%timestamp:::date-rfc3339% %HOSTNAME% %app-name% %msg%

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 optional

Example: TOKEN tag="LiteralValue"

content of the structured data block of rfc5424 message

ca string optional

Example: -----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----\n

PEM encoded CA certificate

key string optional

Example: -----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----\n

(PEM format) client key if the server requires client authentication

cert string optional

Example: -----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----\n

(PEM format) client cert to use

url string optional

Example: https://user:[email protected]:9200

Opensearch connection URL

index_prefix string optional

Example: opensearch-logs

Opensearch index prefix

index_days_max integer optional

Example: 5

Maximum number of days of logs to keep

Min: 1

Max: 10000

Default: 7

timeout number optional

Example: 10

Opensearch request timeout limit

Min: 10

Max: 120

Default: 10

site string optional

Example: http-intake.logs.datadoghq.com

Datadog connection URL

datadog_api_key string optional

Example: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Datadog API key

Request Sample

Show Request Sample
import os
from pydo import Client

client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN"))

req = {
  "config": {
    "server": "192.168.0.1",
    "port": 514,
    "tls": False,
    "format": "rfc3164"
  }
}

resp = client.databases.update_logsink(database_cluster_uuid="9cc10173-e9ea-4176-9dbc-a4cee4c4ff30", logsink_id="50484ec3-19d6-4cd3-b56f-3b0381c289a6", body=req)

More Information

See /v2/databases/{database_cluster_uuid}/logsink/{logsink_id} in the API reference for additional detail on responses, headers, parameters, and more.

In this article...


We can't find any results for your search.

Try using different keywords or simplifying your search terms.


Web Proxy Viewer  |  New URL  |  Original Page