Created on
‎10-03-2023
08:06 AM
Edited on
‎04-17-2025
07:47 AM
By
Stephen_G
Description | This article explains how FortiAnalyzer enables log forwarding to an external syslog server, Common Event Format (CEF) server, or another FortiAnalyzer. It provides a detailed guide on configuring Log Forwarding and includes troubleshooting steps. |
Scope | FortiAnalyzer. |
Solution |
If Log messages match 'All', the configuration will be as follows:
If log messages match 'Any of the following Conditions', the configuration will be as follows:
set log-filter-status enable
Upon using 'Any of the following Conditions' if a log row is matched from a condition, others are not checked.
Consider this configuration:
config system log-forward edit 1 set mode forwarding set fwd-max-delay realtime set server-name "ABC" set server-addr "10.35.81.33" set fwd-server-type syslog set log-filter-status enable config log-filter edit 1 set field level set oper != set value "debug" next edit 2 set field free-text set oper match set value "!dstport==53" next end set signature 5425690669366982019 next end
Logs of DNS queries will be forwarded. If the goal is to resolve debug logs and logs related to DNS queries not being forwarded to the ABC Syslog server, it is necessary to pass to 'All' in the Log messages matching settings.
This is clear in the last row of the output of the debug with level 3:
Note: Log forwarding may also be optimized in terms of bandwidth by using compression (only when sending to FortiAnalyzer):
config system log-forward edit "x" set fwd-compression enable end
Troubleshooting:
Enable debug on logfwd process and restart logfwd:
diagnose debug application logfwd 8 diagnose debug en diagnose test application logfwd 99
Let it run for a few minutes and disable debug:
diagnose debug disable
Note: By default, not selecting any device in Log Forwarding Filters -> Device Filters means all devices in the ADOM are forwarding the logs.
Note: There is no feature for FortiAnalyzer to create reports for its system events. It has to be a device other than the FortiAnalyzer itself.
Related articles and documents:
|
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2025 Fortinet, Inc. All Rights Reserved.