Skip to main content

Logs

System logs are collected automatically and available in the Console. No SSH or manual log aggregation required. The Crusoe Watch Agent collects logs, which you can search, filter, and inspect directly in the Console.

Managed logs is available for both Crusoe Managed Kubernetes (CMK) clusters and Crusoe Virtual Machines (VMs).

note

Managed Logs is in production-ready preview. Please reach out to Crusoe Cloud Support to learn more.

Prerequisites

To use Logs, you need:

For CMK clusters:

For VMs:

Log Sources

The Crusoe Watch Agent collects the following log sources:

Log SourceDescriptionAvailability
JournalDSystem-level logs from journald — kernel messages (GPU XID errors, OOM events) and system services. CMK nodes also include kubelet and container runtime.CMK and VM
crusoe-watch-agentCrusoe Watch Agent service logsCMK and VM
cwa-config-reloaderCrusoe Watch Agent config reloader logsVM only

Accessing Logs Using Console UI

You can access logs in Console UI in two ways:

  1. Managed Logs page — Navigate to Managed Logs in the left navigation bar to search logs across all your CMK clusters and VMs in a unified view.
  2. Resource-specific view — Navigate to Orchestration > select your cluster > Logs tab.

Searching and Filtering

You can use the following filters to narrow your log search:

FilterDescription
Instance nameFilter logs by specific node or VM name
Log sourceFilter by log source (see Log Sources)
SeverityFilter by log severity level (see severity levels below)
Time windowSpecify a start and end time to narrow results
Text searchSearch log content using basic text matching

Combine multiple filters to narrow results. For example, search for XID errors in JournalD logs from a specific node within the last 24 hours.

Log Severity Levels

Logs are normalized to the 8-tier RFC 5424 severity taxonomy:

LevelSeverityDescription
0EmergencySystem is unusable
1AlertAction must be taken immediately
2CriticalCritical condition; application cannot continue
3ErrorError handled, service continues
4WarningUnexpected situation, but handled gracefully
5NoticeNormal but significant condition
6InfoNormal operational events (startup, shutdown, config changes)
7DebugDetailed diagnostic information
UndefinedLog entry has no severity field

Querying Logs via API

Queries use LogsQL, VictoriaLogs' query language.

Authentication

Use the same monitoring token generated for metrics access (see Virtual Machines Metrics or CMK Metrics). Pass it as a bearer token:

Authorization: Bearer $monitoring_token

Conventions

  • Time formats accepted by start, end, start_time, end_time, time, step, and offset: Unix epoch seconds, relative durations (5m, 1h, 6h), RFC3339 (2026-05-10T12:00:00Z), or the literal now.
  • Default time window: Defaults to the last 15 minutes (now-15m to now).
  • Retention boundary: a start_time older than the 7-day retention window returns 400.
  • Unknown query parameters return 400 with the list of accepted names.
  • LogsQL queries (query parameter) are limited to 4096 characters and 10 pipe operations.
  • Repeatable parameters (e.g. levels, instance_names, cluster_id) accept multiple occurrences: ?levels=ERROR&levels=WARNING.
  • NDJSON responses contain one JSON object per line; JSON responses are a single object.

Endpoints

EndpointPurposeResponse
GET /logsStructured log search using typed filters (no raw LogsQL needed)NDJSON
GET /logs/queryRun a raw LogsQL query and stream matching log entriesNDJSON
GET /logs/tailLive-stream new log entries matching a LogsQL query (up to 10 min)NDJSON (stream)
GET /logs/countProject-scoped total countNDJSON
GET /logs/histogramProject-scoped time-bucketed countsNDJSON
GET /logs/facetsProject-scoped facet countsNDJSON
GET /logs/fieldsList field names present in matching logs, with hit countsJSON
GET /logs/field_valuesList distinct values of one field, with hit countsJSON
GET /logs/streamsList log streams matching a LogsQL queryJSON
GET /logs/statsPoint-in-time stats query (query must contain a stats pipe)JSON
GET /logs/stats_rangeRange stats query over time (query must contain a stats pipe)JSON

GET /logs

Structured log search built from typed filters; no raw LogsQL required.

ParameterTypeRequiredDefaultNotes
search_querystringnoFree-text message filter
cluster_idstringnoSingle cluster
levelsstring (repeatable)noe.g. INFO, ERROR
instance_namesstring (repeatable)noVM/node names
sourcesstring (repeatable)noLog source identifiers
start_timestring (time)no
end_timestring (time)no
limitintegerno100Capped at 5000
offsetintegerno0Pagination offset
sortstringnoSort order

Example — fetch the most recent 50 ERROR-level logs for a cluster:

curl -G "https://api.crusoecloud.com/v1/projects/$project_id/logs" \
-H "Authorization: Bearer $monitoring_token" \
--data-urlencode "cluster_id=$cluster_id" \
--data-urlencode "levels=ERROR" \
--data-urlencode "limit=50" \
--data-urlencode "sort=desc"

GET /logs/query

Run a raw LogsQL query. If the query has no _time: filter, the time bounds from start/end are injected automatically.

ParameterTypeRequiredDefaultNotes
querystring (LogsQL)yesValidated
startstring (time)nonow-15m
endstring (time)nonow
limitintegerno5000Must be > 0; values above 5000 are capped to 5000

Example — query logs for a specific VM:

curl -G "https://api.crusoecloud.com/v1/projects/$project_id/logs/query" \
-H "Authorization: Bearer $monitoring_token" \
--data-urlencode "query=crusoe_vm_id:$vm_id"

Example — limit results to 10 entries:

curl -G "https://api.crusoecloud.com/v1/projects/$project_id/logs/query" \
-H "Authorization: Bearer $monitoring_token" \
--data-urlencode "query=crusoe_vm_id:$vm_id" \
--data-urlencode "limit=10"

Example — search for error logs in a specific VM:

curl -G "https://api.crusoecloud.com/v1/projects/$project_id/logs/query" \
-H "Authorization: Bearer $monitoring_token" \
--data-urlencode "query=crusoe_vm_id:$vm_id AND error"

GET /logs/tail

Open a long-lived stream of new log entries matching a LogsQL query. The connection is automatically closed after 10 minutes.

ParameterTypeRequiredNotes
querystring (LogsQL)yesOnly query is accepted; other parameters return 400

Example — live-tail logs for a VM:

curl -N -G "https://api.crusoecloud.com/v1/projects/$project_id/logs/tail" \
-H "Authorization: Bearer $monitoring_token" \
--data-urlencode "query=crusoe_vm_id:$vm_id"

GET /logs/count

Project-scoped total count.

ParameterTypeRequired
cluster_idstring (repeatable)no
vm_idstring (repeatable)no
search_querystringno
levelsstring (repeatable)no
instance_namesstring (repeatable)no
sourcesstring (repeatable)no
start_timestring (time)no
end_timestring (time)no

Example — count error logs in the last hour:

curl -G "https://api.crusoecloud.com/v1/projects/$project_id/logs/count" \
-H "Authorization: Bearer $monitoring_token" \
--data-urlencode "levels=ERROR" \
--data-urlencode "start_time=now-1h"

GET /logs/histogram

Project-scoped histogram across multiple clusters and VMs.

ParameterTypeRequiredNotes
intervalstring (duration)yesBucket size, e.g. 1m, 5m, 1h
cluster_idstring (repeatable)no
vm_idstring (repeatable)no
search_querystringno
levelsstring (repeatable)no
instance_namesstring (repeatable)no
sourcesstring (repeatable)no
start_timestring (time)no
end_timestring (time)no
group_bystringnoMetadata key to group series by

Example — hourly log volume over the last 24 hours, broken out by severity:

curl -G "https://api.crusoecloud.com/v1/projects/$project_id/logs/histogram" \
-H "Authorization: Bearer $monitoring_token" \
--data-urlencode "interval=1h" \
--data-urlencode "start_time=now-24h" \
--data-urlencode "group_by=level"

GET /logs/facets

Project-scoped counts grouped by a metadata field. Supports multiple clusters and VMs.

ParameterTypeRequiredNotes
fieldstring (enum)yesOne of: instance_names, log_sources, levels
cluster_idstring (repeatable)no
vm_idstring (repeatable)no
search_querystringno
levelsstring (repeatable)no
instance_namesstring (repeatable)no
sourcesstring (repeatable)no
start_timestring (time)no
end_timestring (time)no

Example — top instance names producing errors in the last 24 hours:

curl -G "https://api.crusoecloud.com/v1/projects/$project_id/logs/facets" \
-H "Authorization: Bearer $monitoring_token" \
--data-urlencode "field=instance_names" \
--data-urlencode "levels=ERROR" \
--data-urlencode "start_time=now-24h"

GET /logs/fields

List the field names present in logs matching the query, with hit counts.

ParameterTypeRequiredDefault
querystring (LogsQL)yes
startstring (time)nonow-15m
endstring (time)nonow

Response:

{
"values": [
{ "value": "_msg", "hits": 1234 },
{ "value": "level", "hits": 1230 }
]
}

Example — list fields available in JournalD logs:

curl -G "https://api.crusoecloud.com/v1/projects/$project_id/logs/fields" \
-H "Authorization: Bearer $monitoring_token" \
--data-urlencode "query=log_source:journald"

GET /logs/field_values

List distinct values of a single field, with hit counts.

ParameterTypeRequiredDefaultNotes
fieldstringyesInternal/forbidden fields return 400
querystring (LogsQL)yes
startstring (time)nonow-15m
endstring (time)nonow
limitintegerno100Must be ≥ 1; values above 1000 are capped to 1000

Response:

{
"values": [
{ "value": "INFO", "hits": 8123 },
{ "value": "ERROR", "hits": 142 }
]
}

Example — list the distinct severity levels seen in the last hour:

curl -G "https://api.crusoecloud.com/v1/projects/$project_id/logs/field_values" \
-H "Authorization: Bearer $monitoring_token" \
--data-urlencode "field=level" \
--data-urlencode "query=*" \
--data-urlencode "start=now-1h"

GET /logs/streams

List log streams (label-set identifiers) matching a LogsQL query.

ParameterTypeRequiredDefaultNotes
querystring (LogsQL)yes
startstring (time)nonow-15m
endstring (time)nonow
limitintegerno100Must be ≥ 1; values above 1000 are capped to 1000

Example — list streams emitting JournalD logs in the last hour:

curl -G "https://api.crusoecloud.com/v1/projects/$project_id/logs/streams" \
-H "Authorization: Bearer $monitoring_token" \
--data-urlencode "query=log_source:journald" \
--data-urlencode "start=now-1h"

GET /logs/stats

Run a point-in-time LogsQL stats aggregation, e.g. * | stats count().

ParameterTypeRequiredNotes
querystring (LogsQL)yesMust contain a stats pipe, otherwise 400
timestring (time)noPoint-in-time evaluation timestamp

Example — total error count grouped by severity right now:

curl -G "https://api.crusoecloud.com/v1/projects/$project_id/logs/stats" \
-H "Authorization: Bearer $monitoring_token" \
--data-urlencode "query=* | stats by (level) count() AS total"

GET /logs/stats_range

Run a LogsQL stats aggregation over a time range with stepping.

ParameterTypeRequiredNotes
querystring (LogsQL)yesMust contain a stats pipe, otherwise 400
startstring (time)no
endstring (time)no
stepstring (duration)noBucket size, e.g. 5m, 1h
offsetstring (duration)noTime offset, e.g. 2h, 5h

Example — error rate per 5-minute bucket over the last 6 hours:

curl -G "https://api.crusoecloud.com/v1/projects/$project_id/logs/stats_range" \
-H "Authorization: Bearer $monitoring_token" \
--data-urlencode "query=level:ERROR | stats count() AS errors" \
--data-urlencode "start=now-6h" \
--data-urlencode "step=5m"

Log Retention

Logs are retained for 7 days and automatically purged after 7 days.

Common Troubleshooting Workflows

Diagnosing Storage Mount Issues

  1. Navigate to Logs and filter by node instance name.
  2. Set the log source to JournalD and search for Kubelet entries.
  3. Search for mount errors: MountVolume, nfs.
  4. Check for filesystem errors, RAID issues, or NFS connectivity problems.

What's Next

  • Topology — Identify unhealthy nodes and run diagnostics
  • Metrics — Correlate log events with performance data
  • Notifications — Get notified about resource health via email and in-console, and set up alert routing to Slack or webhooks