Skip to main content

Get log entries for a systemd unit

GET 

/node/:hostname/log/unit/:name

Retrieve log entries for a specific systemd unit on the target node.

Request

Path Parameters

    hostname stringrequired

    Possible values: non-empty

    Target agent hostname, reserved routing value (_any, _all), or label selector (key:value).

    name stringrequired

    Possible values: non-empty

    Systemd unit name (e.g., "nginx.service", "sshd.service").

Query Parameters

    lines integer

    Possible values: >= 1 and <= 10000

    Default value: 100

    Maximum number of log lines to return.

    since string

    Return log entries since this time. Accepts systemd time specifications (e.g., "1h", "2026-01-01 00:00:00").

    priority string

    Filter by log priority level (e.g., "err", "warning", "info", "debug").

Responses

Log entries for the specified unit.

Schema

    job_id uuid

    The job ID used to process this request.

    results

    object[]

    required

  • Array [

  • hostname stringrequired

    The hostname of the agent.

    status stringrequired

    Possible values: [ok, failed, skipped]

    The status of the operation for this host.

    entries

    object[]

    Log entries from this agent.

  • Array [

  • timestamp string

    Log entry timestamp.

    unit string

    Systemd unit that produced this entry.

    priority string

    Log priority level.

    message string

    Log message text.

    pid integer

    Process identifier that produced this entry.

    hostname string

    Hostname of the system that produced this entry.

  • ]

  • error string

    Error message if the agent failed.

  • ]

Loading...