}}

DC/OS cluster nodes generate logs that contain diagnostic and status information for DC/OS core components and DC/OS services.

Service, Task, and Node Logs

The logging component provides an HTTP API (/system/v1/logs/), which exposes the system logs.

You can access information about DC/OS scheduler services, like Marathon or Kafka, with the following CLI command:

dcos service log --follow <scheduler-service-name>

You can access DC/OS task logs by running this CLI command:

dcos task log --follow <service-name>

You access the logs for the master node with the following CLI command:

dcos node log --leader

To access the logs for an agent node, run dcos node to get the Mesos IDs of your nodes, then run the following CLI command:

dcos node log --mesos-id=<node-id>

You can download all the log files for your service from the Services > Services tab in the DC/OS GUI. You can also monitor stdout/stderr.

For more information, see the Service and Task Logs quick start guide.

System Logs

DC/OS components use systemd-journald to store their logs. To access the DC/OS core component logs, SSH into a node and run this command to see all logs:

journalctl -u "dcos-*" -b

You can view the logs for specific components by entering the component name. For example, to access Admin Router logs, run this command:

journalctl -u dcos-nginx -b

You can find which components are unhealthy in the DC/OS GUI from the Nodes tab.

Aggregation

Unfortunately, streaming logs from machines in your cluster isn’t always viable. Sometimes, you need the logs stored somewhere else as a history of what’s happened. This is where log aggregation really is required. Check out how to get it setup with some of the most common solutions:

Quick Start

Use this guide to get started with DC/OS logging. Prerequisites: You must have DC/OS and the DC/OS CLI installed. You must be logged in as as a superuser or have been granted user ...

Controlling Access to Task Logs

You can restrict user access to task logs. To restrict access to task logs, you must use service or job groups. This allows you to define which logs you want your user to be able t...

Logging API

The Logging API exposes node, component, and container (task) logs. The Logging API is backed by the DC/OS Log component, which runs on all nodes in the cluster. For more informati...

Logging API Examples

This topic provides common usage examples for the Logging API. Prerequisites: Bash Curl jq DC/OS DC/OS CLI must be installed, configured, and logged in. Extract DCOS_URL and DCOS_A...