Skip to content
This repository has been archived by the owner on May 14, 2021. It is now read-only.

Datadog Logging Config

Doody Parizada edited this page May 31, 2018 · 2 revisions

/etc/rsyslog.d/datadog.conf:

$template DatadogFormat,"c5458962d39cac2cb4d50822c2c034cb <%pri%>%protocol-version% %timestamp:::date-rfc3339% %HOSTNAME% %app-name% - - - %msg%\n"

ruleset(name="infiles") {
    action(type="omfwd" target="intake.logs.datadoghq.com" protocol="tcp" port="10514" template="DatadogFormat")
}

input(type="imfile" ruleset="infiles" Tag="payment" File="/var/log/syslog" StateFile="syslog")

add the following to /etc/rsyslog.conf:

module(load="imfile" PollingInterval="10") #needs to be done just once - datadog

restart rsyslog:

systemctl restart rsyslog
Clone this wiki locally