MikroTik API icon

MikroTik API

Community Node for MikroTik RouterOS API

Actions67

Log → Get All

AI-generated

Summary

Retrieves all log entries from the MikroTik device, optionally filtered by topic and/or message regex.

Inputs

  • logTopic — Filter log entries by topic (e.g. system, info). Passed as ?topics parameter to the API.
  • logMessage — Filter log entries by message content using a regex pattern. Passed as ~message parameter to the API.
  • options — Optional connection and response formatting settings.

Output shape

Array of log entry objects returned by the MikroTik /log/print API command. Each entry contains properties such as time, topics, and message. Count reflects total entries retrieved.

If the 'cleanKeys' option is enabled, all hyphens (-) and forward slashes (/) in property keys are replaced with underscores (_) before being returned to the workflow.

Examples

Example 1: Fetch all system log entries

Set logTopic to 'system' and leave logMessage empty.

Example 2: Fetch logs matching a regex in the message

Set logMessage to a pattern like 'error' or 'critical' while leaving logTopic empty.

Links

Discussion