Add a Log Drain to your App

Integration Purposes

Using a log management solution to gather the logs from applications ease the work when trying to find an information. A few SaaS solutions exist such as Logentries, Logmatic.io, Papertrail or Graylog. You can also host such solution on Scalingo. Here is a tutorial on how to deploy the ELK stack on the platform.

Scalingo also supports sending applications logs using the standard syslog protocol over UDP, TCP or TCP+TLS.

Third-Party Provider Integrations

Our system is able to send logs to the following SaaS logs processing providers:

If you would like another provider to be added, feel free to contact Scalingo support.

Configuration of your Application on Scalingo

The log drains configuration is done using the CLI.

Add a Log Drain

To add a log drain management service you have to use the log-drains-add command. The parameters used depend on the chosen provider. It is possible to add multiple log drains to a single application.

Below, an exhaustive list of examples of additions for each of the supported vendors.

Scalingo Hosted ELK Stack

scalingo --app my-app log-drains-add --type elk \
  --url https://my-user:123456789abcdef@logstash-app-name.osc-fr1.scalingo.io

Where

Datadog

scalingo --app my-app log-drains-add --type datadog \
  --token 123456789abcdef --drain-region eu

Where

  • token: Datadog API key you can find here.
  • region: eu or us depending on your Datadog account region.

Logentries

scalingo --app my-app log-drains-add --type logentries --token 123456789abcdef

Where

OVH hosted Graylog

scalingo --app my-app log-drains-add --type ovh-graylog \
  --token 123456789abcdef --host tag3.logs.ovh.com

Where

  • token: graylog token
  • host: access point provided by OVH. Instructions to get the these variables are available on OVH documentation.

Papertrail

scalingo --app my-app log-drains-add --type papertrail \
  --host logs2.papertrailapp.com --port 12345

Where

Syslog TCP+TLS

scalingo --app my-app log-drains-add --type syslog \
  --host custom.logstash.com --port 12345

Where

  • host: host of the syslog server
  • port: port number of the syslog server

List Log Drains

You can list all log drains of an application with the log-drains command:

scalingo --app my-app log-drains

Here is an example of the output:

+--------------------------------------------------------------------+
|                                URL                                 |
+--------------------------------------------------------------------+
| tcp+tls://logs.papertrailapp.com:10333                             |
| ovh://:878e091a-655c-4d40-b4be-72609f8949d0@tag1.logs.ovh.com:6514 |
+--------------------------------------------------------------------+

Delete a Log Drain

To delete a drain, you have to provide the URL to delete. You can get it by listing the logs drain of an application (list command)

scalingo --app my-app log-drains-remove tcp+tls://logs.papertrailapp.com:10333

mode_edit Suggest edits