Technical Tip: Miglogd Daemon: logging engine and its dependencies
Description | This article describes Miglogd, the core FortiGate log-building and publishing daemon. It receives raw log entries from various subscriber daemons (traffic, event, application-control, IDS/IPS, etc.), formats them, applies filter rules, and forwards the final log messages to the local log subsystem (locallogd) and/or remote log collectors such as fgtlogd, FortiAnalyzer, FortiCloud, and Syslog servers. |
Scope | FortiGate (hardware & virtual) running any supported firmware version (e.g. v7.x, v8.0). |
Solution | The daemon runs as a master process (ID 0) with one or more child processes that handle parallel log streams. It also provides a publisher/subscriber framework that other daemons can hook into, allowing modular expansion (e.g., reportd for log reports, samlogd for security‑event analytics, etc.). Section 1: Master/Child architecture. Miglogd runs as a master (ID 0) that spawns N child daemons to parallel‑process logs. Section 2: Log publishing. Formats logs and publishes them to local (locallogd) and remote (fgtlogd) daemons Section 3: Remote log server status. Shows the status of connections to FortiAnalyzer, FortiCloud, or Syslog servers. Section 4: Debugging. Enables detailed debug output for the log‑filter engine, filter strings, and file‑search behaviour. Section 5: Log dumping/backup. Temporarily pause miglogd to back up log files or dump raw log data safely. Section 6: Performance tuning. Adjust the number of child processes based on log volume. Use the add/remove child commands above; monitor interface‑missed (queues overflow) to decide if more children are needed. Troubleshooting flow:
|
