Setting up a log drain

Nex!™ supports setting up a log drain for sending application logs to another platform (SumoLogic, Splunk, Elasticsearch). All that's required is to specify the URL where logs should be sent to.








1 - Ensure logs are redirected to STDOUT in your Express 

See Deploying Express "Logging" section.

2 - Adding a HTTP log drain to your application on Nex!

Just run the command below for your application. If you don't have a log drain URL you should create one first. See the next sections for instructions on how to do that with SumoLogic.

# Add a logdrain for the 'holistic-salmon' app
nex-cli apps:update holistic-salmon --http-log-drain https://some-log-platform.com/some-random-log-drain-token


# Restart your application for the change to take effect
nex-cli apps:restart holistic-salmon

3 - Creating a HTTP Log Drain in SumoLogic

You first need to register a Hosted SumoLogic Collector and use the generated collector URL

  1. Go to Manage > Collection > Add Collector
  2. Select "Hosted Collector" (the collector will be hosted by SumoLogic)
    1. For the name you should use the name of your actual connector for the log drain. E.g.: connector-vend-prd or connector-vend-uat
    2. SumoLogic then ask the type of collector you want. Select "HTTP"
    3. Use the same name as the collector for the name of the HTTP endpoint (e.g. connector-vend or connector-vend-uat)
    4. Select "UTC/Etc" for the timezone
  3. Once created SumoLogic will display a popup showing the log drain URL. Just copy that and use it for the next step