DCP Workers

This guide explains how to configure your Distributed Computing Platform (DCP) workers to send logs to Better Stack using syslog-ng. This allows you to centralize log management for troubleshooting and analysis.

Create a Better Stack source

To begin, you need a Better Stack source configured for syslog-ng.

  1. Sign up for a Better Stack account if you don't yet have one.
  2. Create a new syslog-ng source in Better Stack.
  3. Under "Name", enter a descriptive name for your DCP worker.
    For example, DCP Worker - MyProject
  4. (Optional) Change the "Data Region" to specify a data storage location.
  5. Click Connect Source.

You will now be on the Data Ingestion page for your new source. Copy the Ingesting host and Source token, as you'll need them for the next step.

Configure your DCP worker

Now, configure your DCP worker to send logs to the Better Stack source you just created. This involves setting the syslog URL for your worker.

Syslog URL for your worker
tls://$INGESTING_HOST_VEC?logtail@11993+source_token=$SOURCE_TOKEN


Choose the method that applies to your DCP worker setup:

Command-line workers

If you are running a command-line worker, use the --syslog option:

Configure command-line worker
bin/dcp-worker --syslog='tls://$INGESTING_HOST_VEC?logtail@11993+source_token=$SOURCE_TOKEN'


DCP config files

If you use dcp-config files for configuration, edit the worker.logging.syslog.url node.

The easiest way is to create or modify /etc/dcp/dcp-worker/dcp-config.js with the following content:

Configure dcp-config.js
dcpConfig.worker.logging.syslog.url = 'tls://$INGESTING_HOST_VEC?logtail@11993+source_token=$SOURCE_TOKEN';


Windows Screensaver workers

For Windows Screensaver workers, set the URL as a string value in the Windows Registry:

HKLM\Distributive\dcp-worker\dcp\config\worker\logging\syslog\url

Verify logs in Better Stack

Once your worker is configured and restarted, go to Live tail. πŸš€

This view will show your log messages in real-time as your DCP worker generates them.