Export logs
Crunchy Bridge has logging integration to allow you to send your logs from your Postgres database to another logging-as-a-service provider.
Crunchy Bridge currently supports:
- Providers using a public certificate available within AlmaLinux 8 or 9
- Providers using a Let's Encrypt certificate
- Logentries
- Papertrail
- Sumo Logic
Logs are sent over TLS and verify the provider's certificate by default. You can disable certificate verification for providers that require it, but only do so when you understand and accept the security tradeoff. This control requires a server image that supports configurable certificate verification; refresh an older cluster if the control is unavailable.
Log destinations
A log destination defines where the Bridge platform should export the logs for a given cluster.
You can set up a new log destination from the cluster's Logging page. The setup guide will walk you step by step through integrating with one of the major logging providers.
Logging can also be configured from the CLI. For example:
cb logdest add --cluster $CLUSTER_EID --host <log_host> --port <log_port> --template '<template>'
Replace the host, port, and template with the values for your provider.
After adding a destination, click Send Test Log and confirm that the message arrives in the provider. If it does not, verify the host, port, TLS certificate, and template before changing Postgres logging settings.
Provider setup
We have done our best to capture the steps for setting up each logging provider listed below. However, we know these steps may become stale as each provider iterates on their processes. Please let us know if you have any difficulty with these instructions.
Honeybadger
Host: in.honeybadger.io
Port: 6514
Template:
<$PRI>1 $ISODATE $HOST $PROGRAM $PID ${MSGID:--} [honeybadger@61642 api_key=\"Your project API key\"] $MSG\n
You can add environment=\"production\" after the API key if you want that field
in the structured data.
New Relic
Host: newrelic.syslog.nr-data.net
Port: 6514
The host above is for a US account. For an EU account use
newrelic.syslog.eu.nr-data.net, and for an account in Japan use
newrelic.syslog.jp.nr-data.net.
Template:
YOUR_LICENSE_KEY <${PRI}>1 ${ISODATE} ${HOST:--} ${PROGRAM:--} ${PID:--} ${MSGID:--} ${SDATA:--} $MSG\n
Datadog
Host: intake.logs.datadoghq.com
Port: 10516
Template:
YOURAPIKEY <${PRI}>1 ${ISODATE} ${HOST:--} ${PROGRAM:--} ${PID:--} ${MSGID:--} ${SDATA:--} $MSG\n
Mezmo (formerly LogDNA)
Host: syslog-a.logdna.com
Port: 6514
Template:
<${PRI}>1 ${ISODATE} ${HOST} ${PROGRAM} ${PID} ${MSGID} [logdna@48950 key=\"YOUR_INGESTION_KEY\"] $MSG\n
Logentries (Rapid7, InsightOps)
Host: REGION.data.logs.insight.rapid7.com
Port: 443
REGION is us, eu, ca, or au, matching the region of the InsightOps
account. The token must be the first field in the template.
Template: TOKEN_HERE $ISODATE $HOST $MSG\n
Loggly (SolarWinds)
Host: logs-01.loggly.com
Port: 6514
Template:
<${PRI}>1 ${ISODATE} ${HOST} ${PROGRAM} ${PID} ${MSGID} [TOKEN@41058 tag=\"TAG\"] $MSG\n
Better Stack (Formerly Logtail)
Host: the ingesting host from your Better Stack source
Port: 6514
Template:
<$PRI>1 $ISODATE $HOST $PROGRAM $PID ${MSGID:--} [logtail@11993 source_token=\"YOUR_LOGTAIL_SOURCE_TOKEN\"] $MSG\n
Papertrail
Host: logsN.papertrailapp.com (Where N is some integer)
Port: Defined per-user; see Papertrail documentation
Template: <$PRI>1 $ISODATE $HOST $PROGRAM $PID $MSGID $MSG\n
Sumo Logic
Host: syslog.collection.YOUR_DEPLOYMENT.sumologic.com
Port: 6514
YOUR_DEPLOYMENT is one of au, ca, ch, de, esc, eu, fed, jp,
kr, us1, or us2. Paste the token Sumo Logic shows, including the
@41123 at the end.
Template: <$PRI>1 $ISODATE $HOST $PROGRAM $PID $MSGID [TOKEN] $MSG\n
Don't see your provider listed and need help getting set up? You can contact support for assistance.
Additional log settings
Learn more about the available log settings in our logging section or check out the Postgres documentation.