set_syslog_target
Configure and enable a FortiGate syslog slot to forward logs to a collector; define server, port, transport (UDP, reliable TCP, or legacy-reliable), and TLS with dry-run validation.
Instructions
Send logs to a syslog server: sets server, port and transport on one of the four syslog slots and enables it. mode is udp (default), reliable (TCP) or legacy-reliable; with reliable, enc_algorithm (high, high-medium, low) adds TLS. Validated against the FortiGate's schema; dry_run (the default) shows the change without sending it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | udp, reliable or legacy-reliable (default udp) | |
| port | No | Port (default 514; 6514 is usual for TLS) | |
| slot | No | Syslog slot 1-4 (default 1) | |
| vdom | No | VDOM (default: FORTIGATE_VDOM, usually root) | |
| server | No | Collector IP or FQDN | |
| disable | No | Turn the slot off instead (server ignored) | |
| dry_run | No | Only validate and show the change (default true) | |
| enc_algorithm | No | TLS for reliable mode: high, high-medium, low or disable |