sql
Configure Structured Query Language (SQL) settings.
Syntax
config system sql
set background-rebuild {enable | disable}
set database-name <string>
set database-type <postgres>
set device-count-high {enable | disable}
set event-table-partition-time <integer>
set fct-table-partition-time <integer>
set logtype {none | app-ctrl | attack | content | dlp | emailfilter | event | generic | history | traffic | virus | voip | webfilter | netscan}
set password <passwd>
set prompt-sql-upgrade {enable | disable}
set rebuild-event {enable | disable}
set rebuild-event-start-time <hh:mm> <yyyy/mm/dd>
set server <string>
set start-time <hh>:<mm> <yyyy>/<mm>/<dd>
set status {disable | local}
set text-search-index {enable | disable}
set traffic-table-partition-time <integer>
set utm-table-partition-time <integer>
set username <string>
config custom-index
edit <id>
set case-sensitive
set device-type {FortiCache | FortiGate | FortiMail | FortiManager | FortiSandbox | FortiWeb}
set index-field <Field-Name>
set log-type <Log-Enter>
end
config ts-index-field
edit <category>
set value <string>
end
end
Variable |
Description |
||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
background-rebuild {enable | disable} |
Disable/enable rebuilding the SQL database in the background (default = enable). |
||||||||||||||||||||||||||||||||||||||||||||||||||||
database-name <string> |
Remote SQL database name (character limit = 64). Command only available when |
||||||||||||||||||||||||||||||||||||||||||||||||||||
database-type <postgres> |
Database type (default = postgres). This command only available when |
||||||||||||||||||||||||||||||||||||||||||||||||||||
device-count-high {enable | disable} |
Enable/disable a high device count (default = disable). You must set to enable if the count of registered devices is greater than 8000:
Caution: Enabling or disabling this command will result in an SQL database rebuild. The time required to rebuild the database is dependent on the size of the database. Please plan a maintenance window to complete the database rebuild. This operation will also result in a device reboot. |
||||||||||||||||||||||||||||||||||||||||||||||||||||
event-table-partition-time <integer> |
Maximum SQL database table partitioning time range for event logs, in minutes (0 - 525600, 0 = unlimited, default = 0). |
||||||||||||||||||||||||||||||||||||||||||||||||||||
fct-table-partition-time <integer> |
Maximum SQL database table partitioning time range for FortiClient logs, in minutes (0 - 525600, 0 = unlimited, default = 240). |
||||||||||||||||||||||||||||||||||||||||||||||||||||
logtype {none | app-ctrl | attack | content | dlp | emailfilter | event | generic | history | traffic | virus | voip | webfilter | netscan} |
Log type. This command only available when |
||||||||||||||||||||||||||||||||||||||||||||||||||||
password <passwd> |
The password that the Fortinet unit will use to authenticate with the remote database. This command only available when |
||||||||||||||||||||||||||||||||||||||||||||||||||||
prompt-sql-upgrade {enable | disable} |
Prompt to convert log database into SQL database at start time on GUI (default = enable). |
||||||||||||||||||||||||||||||||||||||||||||||||||||
rebuild-event {enable | disable} |
Enable/disable a rebuild event during SQL database rebuilding (default = enable). |
||||||||||||||||||||||||||||||||||||||||||||||||||||
rebuild-event-start-time <hh:mm> <yyyy/mm/dd> |
The rebuild event starting date and time (default = 00:00 2000/01/01). |
||||||||||||||||||||||||||||||||||||||||||||||||||||
server <string> |
Set the database ip or hostname. |
||||||||||||||||||||||||||||||||||||||||||||||||||||
start-time <hh>:<mm> <yyyy>/<mm>/<dd> |
Start date and time <hh:mm yyyy/mm/dd>. Command only available when |
||||||||||||||||||||||||||||||||||||||||||||||||||||
status {disable | local} |
SQL database status:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
text-search-index {enable | disable} |
Enable/disable the creation of a text search index (default = disable). |
||||||||||||||||||||||||||||||||||||||||||||||||||||
traffic-table-partition-time <integer> |
Maximum SQL database table partitioning time range for traffic logs (0 - 525600, 0 = unlimited, default = 0). |
||||||||||||||||||||||||||||||||||||||||||||||||||||
utm-table-partition-time <integer> |
Maximum SQL database table partitioning time range in minutes for UTM logs (0 - 525600, 0 = unlimited, default = 0). |
||||||||||||||||||||||||||||||||||||||||||||||||||||
username <string> |
The user name that the unit will use to authenticate with the remote database (character limit = 64). |
||||||||||||||||||||||||||||||||||||||||||||||||||||
Variables for |
|||||||||||||||||||||||||||||||||||||||||||||||||||||
case-sensitive |
Enable/disable case sensitivity. |
||||||||||||||||||||||||||||||||||||||||||||||||||||
device-type {FortiAuthenticator | FortiCache | FortiClient | FortiDDoS | FortiGate | FortiMail | FortiManager | FortiSandbox | FortiWeb} |
Set the device type (default = FortiGate). |
||||||||||||||||||||||||||||||||||||||||||||||||||||
index-field <Field-Name> |
Enter a valid field name. Select one of the available field names. The available options for |
||||||||||||||||||||||||||||||||||||||||||||||||||||
log-type <Log-Enter> |
Enter the log type. The available options for |
||||||||||||||||||||||||||||||||||||||||||||||||||||
Variables for |
|||||||||||||||||||||||||||||||||||||||||||||||||||||
<category> |
Category of the text search index fields. The following is the list of categories and their default fields.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
value <string> |
Fields of the text search filter. Enter one or more field names separated with a comma. |