Bỏ qua, tới nội dung
Dymini Panel
v0.19.1
Mục lục

Logs

Trong trang này

Central logs, live tail, retention, and the container terminal

Search logs. Query: source, service_id, server_id, project_id, level (comma list), q, status (2xx..5xx), since, until, before_time, before_id, limit (max 1000)

GET/api/v1/logs

Phản hồi

  • 200 Search logs. Query: source, service_id, server_id, project_id, level (comma list), q, status (2xx..5xx), since, until, before_time, before_id, limit (max 1000)LogPage
    • entriesLogView[]bắt buộc

      Newest first.

      LogView[]
      • fieldsobjectbắt buộc
      • http_statusinteger | null (int32)
      • idinteger (int64)bắt buộc
      • levelstringbắt buộc
      • logged_atstring (date-time)bắt buộc
      • messagestringbắt buộc
      • project_idstring | null (uuid)
      • server_idstring | null (uuid)
      • service_idstring | null (uuid)
      • sourcestringbắt buộc
    • next_before_idinteger | null (int64)
    • next_before_timestring | null (date-time)

      Pass as before_time and before_id to fetch older lines.

Export matching logs as NDJSON or CSV (format=ndjson|csv, at most 100000 lines); same filters as search

GET/api/v1/logs/export

Phản hồi

  • 200 Export matching logs as NDJSON or CSV (format=ndjson|csv, at most 100000 lines); same filters as search

Ingest up to 1000 log lines (write scope)

POST/api/v1/logs/ingest

Nội dung gửi lênapplication/json

IngestRequest

  • entriesIngestEntry[]bắt buộc
    IngestEntry[]
    • fieldsobject | null
    • http_statusinteger | null (int32)
    • levelstring | null

      Detected from the message when omitted.

    • messagestringbắt buộc
    • server_idstring | null (uuid)
    • service_idstring | null (uuid)

      The project is filled in from the service.

    • sourcestringbắt buộc
    • timestampstring | null (date-time)

      Defaults to now. Must be within the last 30 days.

Phản hồi

  • 200 Ingest up to 1000 log lines (write scope)IngestResult
    • acceptedintegerbắt buộc

Live tail over WebSocket; same filters as search. Messages: {type:entry,entry} or {type:lagged,skipped}

GET/api/v1/logs/tail

Phản hồi

  • 101 Live tail over WebSocket; same filters as search. Messages: {type:entry,entry} or {type:lagged,skipped}

Recent container logs of any service (?tail=); a compose stack combines every service under `==> name <==` headers

GET/api/v1/services/{id}/logs

Phản hồi

  • 200 Recent container logs of any service (?tail=); a compose stack combines every service under `==> name <==` headersLogsView
    • logsstringbắt buộc

Interactive shell over WebSocket (write scope). Query: cols, rows, container (compose service). Send {type:input,data} or {type:resize,cols,rows}; output is binary

GET/api/v1/services/{id}/terminal

Phản hồi

  • 101 Interactive shell over WebSocket (write scope). Query: cols, rows, container (compose service). Send {type:input,data} or {type:resize,cols,rows}; output is binary

Log and metrics retention (admin)

GET/api/v1/settings/retention

Phản hồi

  • 200 Log and metrics retention (admin)RetentionSettings
    • log_daysobjectbắt buộc

      Days to keep per log source.

    • metricsMetricsRetentionbắt buộc
      MetricsRetention
      • h1_daysinteger (int32)bắt buộc
      • m1_daysinteger (int32)bắt buộc

        Days to keep each rollup resolution, 1 to 365.

      • m5_daysinteger (int32)bắt buộc
      • raw_hoursinteger (int32)bắt buộc

        Hours to keep 10-second samples, 1 to 168.

Update per-source log retention in days (admin)

PUT/api/v1/settings/retention

Nội dung gửi lênapplication/json

UpdateRetention

  • log_daysobject

    Days to keep per source, 1 to 365. Sources not listed keep their value.

  • metricsMetricsRetention | null
    MetricsRetention | null

    Một trong:

    • MetricsRetention
      • h1_daysinteger (int32)bắt buộc
      • m1_daysinteger (int32)bắt buộc

        Days to keep each rollup resolution, 1 to 365.

      • m5_daysinteger (int32)bắt buộc
      • raw_hoursinteger (int32)bắt buộc

        Hours to keep 10-second samples, 1 to 168.

    • null

Phản hồi

  • 200 Update per-source log retention in days (admin)RetentionSettings
    • log_daysobjectbắt buộc

      Days to keep per log source.

    • metricsMetricsRetentionbắt buộc
      MetricsRetention
      • h1_daysinteger (int32)bắt buộc
      • m1_daysinteger (int32)bắt buộc

        Days to keep each rollup resolution, 1 to 365.

      • m5_daysinteger (int32)bắt buộc
      • raw_hoursinteger (int32)bắt buộc

        Hours to keep 10-second samples, 1 to 168.