FortiOS Ch. 2

Logging and Monitoring

This chapter is about evidence: what FortiGate logs, where it sends logs, and how to prove why traffic was allowed, denied, dropped, or never seen.

Mental model

Logging is not only for after-the-fact reporting. In NSE-style troubleshooting, logs are evidence that a packet, session, event, or security profile match happened. If logs are absent, that absence is also evidence: traffic may not be matching the policy, logging may be disabled, severity may filter it out, or the FortiGate may not be delivering logs to the selected destination.

Log categories

CategoryWhat it provesCommon use
TrafficA session was accepted, denied, dropped, reset, or otherwise handled by policy.Policy validation, NAT validation, user impact, forensic reconstruction.
EventSomething happened on the system or control plane.HA events, admin login, VPN state, routing events, system health.
Security / UTMA security profile detected or blocked something.IPS, AV, web filter, app control, DLP, anomaly detection.
Local trafficTraffic to or from the FortiGate itself.FortiGuard, DNS, NTP, FortiManager, FortiAnalyzer, admin access.

Log destinations

FortiGate can log to memory, disk, FortiAnalyzer, FortiCloud, syslog, or SIEM tooling. For serious troubleshooting, FortiAnalyzer is the expected Fortinet-native destination because it keeps logs centralized and searchable.

FortiAnalyzer delivery checklist

  1. Confirm FortiAnalyzer server IP and source IP.
  2. Confirm route from FortiGate to FortiAnalyzer.
  3. Confirm reliable/OFTP settings and encryption settings.
  4. Confirm the FortiGate is authorized on FortiAnalyzer.
  5. Generate test logs and confirm arrival.

CLI anchors

diagnose log test

Generate test logs to verify local and remote delivery.

execute log filter reset

Clear CLI log display filters.

execute log display

Show logs from the selected source.

diagnose test application oftp 1

Check FortiAnalyzer/OFTP state.

diagnose sniffer packet any 'host 8.8.8.8' 4 20 l

Packet path visibility with interface names.

diagnose debug flow trace start 100

Policy, route, NAT, and inspection path tracing.

diagnose debug duration 300

Limit debug runtime to avoid leaving noisy debug enabled.

diagnose hardware sysinfo conserve

Confirm or rule out conserve mode.

Reading traffic logs

For practical troubleshooting, the high-value fields are usually srcip, dstip, srcintf, dstintf, policyid, action, service, sentbyte, and rcvdbyte. Those fields tell you which policy matched, what FortiGate did, and whether traffic was one-way or bidirectional.

NSE 8 WATCHPOINTS

Lab exam checkpoint

Goal: build proof habits. Enable logging on a test policy, generate allowed traffic, generate denied traffic, enable implicit deny logging in a lab context, verify logs locally and on FortiAnalyzer, then prove the same path with sniffer and flow debug.

Live-safe with careFortiAnalyzer VM recommended