Fortinet Document Library

Version:

Version:

Version:

Version:

Version:

Version:


Table of Contents

CLI Reference

config system alert

Use this command to configure that monitor critical events and metric data of various objects in the FortiADC appliance, and then provides reactions for cases such as email, SNMP trap, and syslog, etc..

Before you begin:

You must have read-write permission for system settings.

Syntax

config system alert

edit "alert_name"

set priority {high|low|middle}

set use-rolling-window {enable|disable}

set rolling-window <integer>

set occurrence-number <integer>

set expire-time <integer>

set throttle-alert <integer>

set alert-source-type {metric|event}

set metric-object-type {interface|slb-virtual-server|system}

set metric-object-instance <string>

set duration <integer>

set comments comments

config alert-metric-expr-member

edit "member_name"

set metric <datasource>

set metric-comparator {eq|le|ge}

set value <integer>

next

end

 

alert_name

The name of an alert configuration.

priority

Select one of the following:

  • high
  • medium
  • low

use-rolling-window

Enable or disable.

rolling-window

The rolling window in seconds.

Note: This parameter can be configured only when use-rolling-window is enabled. If occurrence-number (see below) is set to 1, then every occurrence will trigger the alert. If occurrence-number is set to a higher number, such as 100, then the alert is triggered every 100 times the event happens. When use-rolling-window is enabled, a corresponding rolling-window must be specified. If the number of occurrences is true within the specified rolling-window, then the alert is triggered. For example, if a client attempts more than 100 TCP connections within a five-minute rolling-window, that triggers the alert.

occurrence-number

The number of times an event must have occurred to trigger an alert.

Note: This parameter can be configured only when use-rolling-window is enabled.

expire-time

The length of time an alert remains visible on FortiADC's web interface.

Note: Alerts "older" than their expire-time are grayed out.

throttle--alert

The interval (in seconds) at which the system sends out an alert.

Note: Valid values range from 0 to 3,600 (seconds). For example, if you set the value to 10, the system will send out an alert every 10 seconds. A value of 0 indicates there will be no such time-based throttling — the system will send out alerts as soon as they are triggered. The timer starts all over again once an alert is triggered.

alert-source-type

Specify either of

  • event
  • metric

metric-object-type

Specify one of the following:

  • interface
  • slb-virutal-server
  • system
metric-object-instance

If "metric-object-type" is interface or slb-virtual-server, you need to select the metric-object-instance to specify the monitoring resource. If "metric-object-type" is interface, the instance should be the interface name. If "metric-object-type" is slb-virtual-server, the instance should be the virtual server name.

duration

Metric duration. An alert is triggered if the metric's value is >=, =, or <= to the specified value field, averaged over the period of time specified by the duration value.

metric

If metric-object-type is interface, the metric could be:

  • dev_if.avg_bandwidth_rx
  • dev_if.avg_bandwidth_tx

If metric-object-type is slb-virtual-server, the metric could be:

  • slb.avg_new_conns
  • slb.current_conns
  • slb.avg_bandwidth_rx
  • slb.avg_bandwidth_tx
  • slb.avg_bandwidth
  • slb.http.avg_client_rtt
  • slb.http.avg_server_rtt
  • slb.http.avg_app_resonse
  • slb.http.avg_new_http_request
  • slb.http.avg_cache_hit_ratio
  • slb.ssl.avg_ssl_bandwidth_rx
  • slb.ssl.avg_ssl_bandwidth_tx
  • slb.ssl.avg_ssl_bandwidth
  • slb.ssl.avg_ssl_failed_sessions
  • slb.ssl.avg_ssl_new_sessions
  • slb.ssl.avg_ssl_current_sessions

If metric-object-type is system, the metric could be:

  • dev_stats.avg_cpu_usage
  • dev_stats.avg_mem_usage
  • dev_stats.avg_disk_usage
  • dev_stats.avg_cpu_temperature
  • dev_stats.avg_sys_temperature
  • dev_stats.avg_psu_temperature

metric-comparator

Alert metric comparator. Set eq, ge, or le relative to the value (see below)

value

Metric value. Specify a value pertinent to the metric specified (see above).

Note: The unit of measurement of the value you set here may vary, depending on the metric specified (see above). For CPU, memory, and disk usage, it's a percentage of the total capacity of the metric. For example, a value of 50 means 50% of the system's CPU, memory, or disk space.

Example

config system alert

edit "metric-sys"

set priority high

set use-rolling-window enable

set rolling-window 50

set occurrence-number 2

set expire-time 3600

set throttle-alert 0

set alert-source-type metric

set metric-object-type system

set duration 5

config alert-metric-expr-member

edit "mem-usage"

set metric dev_stats.avg_mem_usage

set metric-comparator ge

set value 90

next

end

next

edit "metric-vs"

set priority middle

set expire-time 3600

set throttle-alert 0

set alert-source-type metric

set metric-object-type slb-virtual-server

set metric-object-instance l7http

set duration 5

config alert-metric-expr-member

end

next

edit "metric-int"

set priority low

set expire-time 3600

set throttle-alert 0

set alert-source-type metric

set metric-object-type interface

set metric-object-instance port2

set duration 5

config alert-metric-expr-member

edit "avg-bw-tx"

set metric dev_if.avg_bandwidth_tx

set metric-comparator le

set value 20

next

end

next

edit "rs_enable"

set priority high

set use-rolling-window disable

set occurrence-number 300

set expire-time 86400

set throttle-alert 300

set alert-source-type event

set event SLB_Server_ENABLED

set comments comments

next

end

config system alert

Use this command to configure that monitor critical events and metric data of various objects in the FortiADC appliance, and then provides reactions for cases such as email, SNMP trap, and syslog, etc..

Before you begin:

You must have read-write permission for system settings.

Syntax

config system alert

edit "alert_name"

set priority {high|low|middle}

set use-rolling-window {enable|disable}

set rolling-window <integer>

set occurrence-number <integer>

set expire-time <integer>

set throttle-alert <integer>

set alert-source-type {metric|event}

set metric-object-type {interface|slb-virtual-server|system}

set metric-object-instance <string>

set duration <integer>

set comments comments

config alert-metric-expr-member

edit "member_name"

set metric <datasource>

set metric-comparator {eq|le|ge}

set value <integer>

next

end

 

alert_name

The name of an alert configuration.

priority

Select one of the following:

  • high
  • medium
  • low

use-rolling-window

Enable or disable.

rolling-window

The rolling window in seconds.

Note: This parameter can be configured only when use-rolling-window is enabled. If occurrence-number (see below) is set to 1, then every occurrence will trigger the alert. If occurrence-number is set to a higher number, such as 100, then the alert is triggered every 100 times the event happens. When use-rolling-window is enabled, a corresponding rolling-window must be specified. If the number of occurrences is true within the specified rolling-window, then the alert is triggered. For example, if a client attempts more than 100 TCP connections within a five-minute rolling-window, that triggers the alert.

occurrence-number

The number of times an event must have occurred to trigger an alert.

Note: This parameter can be configured only when use-rolling-window is enabled.

expire-time

The length of time an alert remains visible on FortiADC's web interface.

Note: Alerts "older" than their expire-time are grayed out.

throttle--alert

The interval (in seconds) at which the system sends out an alert.

Note: Valid values range from 0 to 3,600 (seconds). For example, if you set the value to 10, the system will send out an alert every 10 seconds. A value of 0 indicates there will be no such time-based throttling — the system will send out alerts as soon as they are triggered. The timer starts all over again once an alert is triggered.

alert-source-type

Specify either of

  • event
  • metric

metric-object-type

Specify one of the following:

  • interface
  • slb-virutal-server
  • system
metric-object-instance

If "metric-object-type" is interface or slb-virtual-server, you need to select the metric-object-instance to specify the monitoring resource. If "metric-object-type" is interface, the instance should be the interface name. If "metric-object-type" is slb-virtual-server, the instance should be the virtual server name.

duration

Metric duration. An alert is triggered if the metric's value is >=, =, or <= to the specified value field, averaged over the period of time specified by the duration value.

metric

If metric-object-type is interface, the metric could be:

  • dev_if.avg_bandwidth_rx
  • dev_if.avg_bandwidth_tx

If metric-object-type is slb-virtual-server, the metric could be:

  • slb.avg_new_conns
  • slb.current_conns
  • slb.avg_bandwidth_rx
  • slb.avg_bandwidth_tx
  • slb.avg_bandwidth
  • slb.http.avg_client_rtt
  • slb.http.avg_server_rtt
  • slb.http.avg_app_resonse
  • slb.http.avg_new_http_request
  • slb.http.avg_cache_hit_ratio
  • slb.ssl.avg_ssl_bandwidth_rx
  • slb.ssl.avg_ssl_bandwidth_tx
  • slb.ssl.avg_ssl_bandwidth
  • slb.ssl.avg_ssl_failed_sessions
  • slb.ssl.avg_ssl_new_sessions
  • slb.ssl.avg_ssl_current_sessions

If metric-object-type is system, the metric could be:

  • dev_stats.avg_cpu_usage
  • dev_stats.avg_mem_usage
  • dev_stats.avg_disk_usage
  • dev_stats.avg_cpu_temperature
  • dev_stats.avg_sys_temperature
  • dev_stats.avg_psu_temperature

metric-comparator

Alert metric comparator. Set eq, ge, or le relative to the value (see below)

value

Metric value. Specify a value pertinent to the metric specified (see above).

Note: The unit of measurement of the value you set here may vary, depending on the metric specified (see above). For CPU, memory, and disk usage, it's a percentage of the total capacity of the metric. For example, a value of 50 means 50% of the system's CPU, memory, or disk space.

Example

config system alert

edit "metric-sys"

set priority high

set use-rolling-window enable

set rolling-window 50

set occurrence-number 2

set expire-time 3600

set throttle-alert 0

set alert-source-type metric

set metric-object-type system

set duration 5

config alert-metric-expr-member

edit "mem-usage"

set metric dev_stats.avg_mem_usage

set metric-comparator ge

set value 90

next

end

next

edit "metric-vs"

set priority middle

set expire-time 3600

set throttle-alert 0

set alert-source-type metric

set metric-object-type slb-virtual-server

set metric-object-instance l7http

set duration 5

config alert-metric-expr-member

end

next

edit "metric-int"

set priority low

set expire-time 3600

set throttle-alert 0

set alert-source-type metric

set metric-object-type interface

set metric-object-instance port2

set duration 5

config alert-metric-expr-member

edit "avg-bw-tx"

set metric dev_if.avg_bandwidth_tx

set metric-comparator le

set value 20

next

end

next

edit "rs_enable"

set priority high

set use-rolling-window disable

set occurrence-number 300

set expire-time 86400

set throttle-alert 300

set alert-source-type event

set event SLB_Server_ENABLED

set comments comments

next

end