test
Use these commands to get cached information from various daemons and to send dummy SNMP traps for testing purposes.
Tab-complete is not supported for many of the last arguments for SNMP test traps, and so you must type the complete argument. For example, if you enter:
diagnose test trap cpu
then the command fails and returns an error (Command failed(-61)). Instead enter the complete argument:
diagnose test trap cpu-high
Syntax
diagnose test application authd [<level_int>]
diagnose test application cmdbsvr {1 | 2 | 3 | 4 | 5 | 6}
diagnose test application csfd [<level_int>]
diagnose test application dnscached {1 | 2 | 3}
diagnose test application forticron [<level_int>]
diagnose test application fortisandbox [[level_int>]
diagnose test application fortisandbox connectivity <fortisandbox_ipv4>
diagnose test application fortisandbox summary {hour | day | week}
diagnose test application geoip list country
diagnose test application geoip list ip <country-code_name>
diagnose test application geoip list ipv6 <country-code_name>
diagnose test application geoip query country <country-code_name>
diagnose test application geoip query ip {<host_ipv4> | <host_ipv6>}
diagnose test application ldapclient dump
diagnose test application mailserviced connection-duration [<seconds_int>]
diagnose test application mailserviced connection-imap-total [<limit_int>]
diagnose test application mailserviced connection-imap-user [<limit_int>]
diagnose test application mailserviced folder-msg-count-threshold {enable | disable | <limit_int>}
diagnose test application miglogd {1 | 2 | 3 | 4 | 5 | 6 | 7 | 99}
diagnose test application snmpd {1 | 2 | 3 | 4 | 99}
diagnose test application urlfilter {1 | 7 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 88 | 89 | 99 | 144}
diagnose test application waagent [<level_int>]
diagnose test trap ap-threshold
diagnose test trap av-threshold
diagnose test trap cpu-high
diagnose test trap ha-event {1 | 2 | 3} <ha-unit_ipv4> <reason_str>
diagnose test trap intf-ip-chg <interface_name>
diagnose test trap log-disk-full
diagnose test trap mail-disk-full
diagnose test trap mem-low
diagnose test trap mail-queue <queue_str>
diagnose test trap raid-event {1 | 2 | 3 | 4 | 5 | 6} <raid_str>
diagnose test trap sys-event {0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10}
diagnose test trap temp-high
diagnose test trap voltage-out-range
diagnose test trap test
|
Variable |
Description |
Default |
|
Enter the IP address of the FortiMail HA unit that you want to simulate a trap for. This argument is valid if ha-event {1 | 2 | 3} is |
|
|
|
Enter the name of the RAID device, such as |
|
|
|
Select which level of authentication daemon information to display. If you omit the level, then the CLI outputs the current level: authd test level is 3 |
0 |
|
|
Select which configuration management database (CMDB) information to display:
|
|
|
|
Enter the IMAP connection timeout in seconds. If you omit the limit, the CLI outputs the current limit: imap connection duration = 1800 (seconds) |
1800 |
|
|
Enter the maximum number of total IMAP connections. If you omit the limit, the CLI outputs the current limit: total imap connection limit = 2048 |
2048 |
|
|
Enter the maximum number of IMAP connections per user. If you omit the limit, the CLI outputs the current limit: user+ip imap connection limit = 5 |
5 |
|
|
Select which level of FortiGate Security Fabric information to display. If you omit the level, then the CLI outputs the current level: csfd test level is 3 |
0 |
|
|
Select which DNS cache information to display or action to perform:
|
|
|
|
Enable or disable the maximum number of counted email in IMAP folders. When you enable the limit, the default maximum applies. If you want to apply a different maximum number, enter the custom limit. |
100000 |
|
|
Select which level of scheduled task information to display. If you omit the level, then the CLI resets the current level to 0 (nothing): forticron test level is 0 |
0 |
|
|
Select the type of HA event to simulate a trap for:
|
|
|
|
Enter the name of the network interface, such as |
|
|
|
Enter a country code such as To get a list of available country codes, enter the command: |
|
|
|
Enter a country code such as To get a list of available country codes, enter the command: |
|
|
|
Enter the name of a mail queue, such as |
|
|
|
Select which local log daemon information to display or action to perform:
|
|
|
|
Enter a country code such as To get a list of available country codes, enter the command: |
|
|
|
Enter an IPv4 or IPv6 address to display its associated geographic region in the GeoIP database. |
|
|
|
Select the type of RAID event to simulate a trap for:
|
|
|
|
Select which SNMP daemon information to display or action to perform:
|
|
|
|
Select the type of system event to simulate a trap for:
|
|
|
|
urlfilter {1 | 7 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 88 | 89 | 99 | 144} |
Select which URL filter daemon information to display or action to perform:
|
|
|
Select which level of Microsoft Azure agent information to display. If you omit the level, then the CLI outputs the current level: waagent test level is 0 |
0 |
Example
FortiMail # diagnose test application geoip query ip 8.8.8.8
System Time: 2025-05-15 11:22:11 EDT (Uptime: 7d 0h 19m)
8.8.8.8 US United States