Send logs to Datadog
Use the Aiven Rsyslog integration to send logs from your Aiven services to your external Datadog account.
Prerequisites
- A Datadog API key
- A running Aiven service
Add a Syslog integration endpoint
You can use this integration endpoint for multiple services.
-
In the project, click Integration endpoints.
-
Select Syslog > Create new or Add new endpoint.
-
Enter an Endpoint name.
-
Configure the Server:
- For the US region enter
intake.logs.datadoghq.com
. - For the EU region use
tcp-intake.logs.datadoghq.eu
.
- For the US region enter
-
Configure the Port:
- For the US region enter
10516
. - For the EU region enter
443
.
- For the US region enter
-
Enable TLS.
-
Set the Format to
custom
. -
To configure the Log Template, enter:
DATADOG_API_KEY <%pri%>1 %timestamp:::date-rfc3339% %HOSTNAME%.AIVEN_PROJECT_NAME %app-name% - - - %msg%
Where:
-
DATADOG_API_KEY
is your Datadog API key. -
AIVEN_PROJECT_NAME
is the name of the project your service is in.noteDatadog correlates metrics and logs by hostname. The integration appends the project name to the hostname to disambiguate between services with the same name in different projects. However, without the project name no log data is lost.
Don't edit the values surrounded by
%
, such as%msg%
, as these are used in constructing the log line.For example:
01234567890123456789abcdefabcdef <%pri%>1 %timestamp:::date-rfc3339% %HOSTNAME%.example-project %app-name% - - - %msg%
-
-
Click Create.
Send logs from an Aiven service to Datadog
- In the service, click Integrations.
- In the Endpoint integrations select Rsyslog.
- Select the integration endpoint you created and click Enable.
Related pages
- Learn more about Datadog and Aiven.
- Monitor PgBouncer with Datadog.
- Enable database monitoring with Datadog.