Litmus Edge 4.4.x - System: Log Forwarding

Get Log Forwarding Configuration

GET {{edgeUrl}}/dm/v2/log-forwarding/config

Return the log forwarding configuration. New between 4.0.x and 4.3.x.

This route is in the Device Management v2 namespace. The v1 swagger does not describe it, which is why it is easy to miss when auditing /dm coverage.

Returns a LoopedgeLogforwardingConfig with projectID and a free-form params object, both required when writing.

Secrets are masked. Auth headers, bearer tokens and similar values come back as *** rather than their real content. That matters for round-tripping: see Update Log Forwarding Configuration.

A device with nothing configured answers 404 with {"error":{"MsgCode":"config.not_found"}}, as in the saved example, rather than an empty configuration object.

Response

Status: 200 OK

{"error":{"Msg":"no log forwarding configuration found","MsgCode":"config.not_found"}}


Update Log Forwarding Configuration

PUT {{edgeUrl}}/dm/v2/log-forwarding/config

Create or replace the log forwarding configuration. Takes a PutConfigRequestBody with projectID and params, both required.

This route is in the Device Management v2 namespace. The v1 swagger does not describe it, which is why it is easy to miss when auditing /dm coverage.

Re-send real secrets, not the masked ones. Get Log Forwarding Configuration returns secret values as ***. Writing that response straight back stores the literal *** and breaks forwarding, so substitute the real values into params before the PUT.

This replaces the configuration rather than merging into it. Send the complete params object.

Changing the configuration does not start forwarding. Follow with Start Log Forwarding.

Request Body

{
    "projectID": "{{log_forwarding_project_id}}",
    "params": {
        "endpoint": "https://logs.example.com/ingest",
        "authHeader": "Bearer <token>"
    }
}

Get Log Forwarding Status

GET {{edgeUrl}}/dm/v2/log-forwarding/status

Whether log forwarding is currently running. New between 4.0.x and 4.3.x.

This route is in the Device Management v2 namespace. The v1 swagger does not describe it, which is why it is easy to miss when auditing /dm coverage.

Returns a LoopedgeLogforwardingStatus: enabled (required), plus projectID and params when a configuration exists.

Unlike the config endpoint this answers 200 even when nothing is configured, reporting {"enabled": false}, so it is the safer availability check of the two.

Response

Status: 200 OK

{"enabled":false}


Start Log Forwarding

POST {{edgeUrl}}/dm/v2/log-forwarding/start

Begin forwarding logs using the stored configuration. No request body. New between 4.0.x and 4.3.x.

This route is in the Device Management v2 namespace. The v1 swagger does not describe it, which is why it is easy to miss when auditing /dm coverage.

Requires a configuration to exist. Confirm the result with Get Log Forwarding Status rather than assuming the call implies a running forwarder.


Stop Log Forwarding

POST {{edgeUrl}}/dm/v2/log-forwarding/stop

Stop forwarding logs. No request body. New between 4.0.x and 4.3.x.

This route is in the Device Management v2 namespace. The v1 swagger does not describe it, which is why it is easy to miss when auditing /dm coverage.

The configuration is kept, so Start Log Forwarding resumes with the same settings.


View this page as Markdown