On this page

Logs management

Log management is currently only available through our API and clever-tools.

Get continuous logs from your application

You can see logs with the command down below.

clever logs

You can also add a flag --before or --after followed by a date (ISO8601 format).

# Here is an example
clever logs --before 2016-08-11T14:54:33.971Z

Logs drains: exporting logs to an external tools

You can use the logs drains to send your application’s logs to an external server with the following command.

clever drain create [--alias <alias>] <DRAIN-TYPE> <DRAIN-URL> [--username <username>] [--password <password>]

Where DRAIN-TYPE is one of:

  • TCPSyslog: for TCP syslog endpoint;
  • UDPSyslog: for UDP syslog endpoint;
  • HTTP: for TCP syslog endpoint (note that this endpoint has optional username/password parameters as HTTP Basic Authentication);
  • ElasticSearch: for ElasticSearch endpoint (note that this endpoint requires username/password parameters as HTTP Basic Authentication);
  • DatadogHTTP: for Datadog endpoint (note that this endpoint needs your Datadog API Key).

You can list the currently activated drains with this command.

clever drain [--alias <alias>]

And remove them if needed

clever drain remove [--alias <alias>] <DRAIN-ID>

ElasticSearch logs drains

ElasticSearch drains use the Elastic bulk API. To match this endpoint, specify /_bulk at the end of your ElasticSearch endpoint.

Each day, we will create an index logstash-<yyyy-MM-dd> and push logs to it.

Datadog logs drains

Datadog has two zones, EU and COM. An account on one zone is not available on the other, make sure to target the good EU or COM intake endpoint.

To create a Datadog drain, you just need to use:

clever drain create DatadogHTTP "https://http-intake.logs.datadoghq.com/v1/input/<API_KEY>?ddsource=clevercloud&service=<SERVICE>&host=<HOST>"

Logs extended storage

Each organisations or personal space has Logs extended storage Cellar addon. This addon will be used to store your applications/addons logs when the hot retention is reached when the feature will be available. Then, the most aged logs will be pushed to Logs extended storage as cold storage. The retention for cold storage will be user defined via a new log management interface.