Fortinet black logo

CLI Reference

config system link-monitor

config system link-monitor

Configure Link Health Monitor.

config system link-monitor
    Description: Configure Link Health Monitor.
    edit <name>
        set addr-mode [ipv4|ipv6]
        set class-id {integer}
        set diffservcode {user}
        set fail-weight {integer}
        set failtime {integer}
        set gateway-ip {ipv4-address-any}
        set gateway-ip6 {ipv6-address}
        set ha-priority {integer}
        set http-agent {string}
        set http-get {string}
        set http-match {string}
        set interval {integer}
        set name {string}
        set packet-size {integer}
        set password {password}
        set port {integer}
        set probe-count {integer}
        set probe-timeout {integer}
        set protocol {option1}, {option2}, ...
        set recoverytime {integer}
        set route <subnet1>, <subnet2>, ...
        set security-mode [none|authentication]
        set server <address1>, <address2>, ...
        set server-config [default|individual]
        config server-list
            Description: Servers for link-monitor to monitor.
            edit <id>
                set id {integer}
                set dst {string}
                set protocol {option1}, {option2}, ...
                set port {integer}
                set weight {integer}
            next
        end
        set service-detection [enable|disable]
        set source-ip {ipv4-address-any}
        set source-ip6 {ipv6-address}
        set srcintf {string}
        set status [enable|disable]
        set update-cascade-interface [enable|disable]
        set update-policy-route [enable|disable]
        set update-static-route [enable|disable]
    next
end

config system link-monitor

Parameter

Description

Type

Size

Default

addr-mode

Address mode (IPv4 or IPv6).

option

-

ipv4

Option

Description

ipv4

IPv4 mode.

ipv6

IPv6 mode.

class-id

Traffic class ID.

integer

Minimum value: 0 Maximum value: 4294967295

0

diffservcode

Differentiated services code point (DSCP) in the IP header of the probe packet.

user

Not Specified

fail-weight

Threshold weight to trigger link failure alert.

integer

Minimum value: 0 Maximum value: 255

0

failtime

Number of retry attempts before the server is considered down.

integer

Minimum value: 1 Maximum value: 3600

5

gateway-ip

Gateway IP address used to probe the server.

ipv4-address-any

Not Specified

0.0.0.0

gateway-ip6

Gateway IPv6 address used to probe the server.

ipv6-address

Not Specified

::

ha-priority

HA election priority.

integer

Minimum value: 1 Maximum value: 50

1

http-agent

String in the http-agent field in the HTTP header.

string

Not Specified

Chrome/ Safari/

http-get

If you are monitoring an HTML server you can send an HTTP-GET request with a custom string. Use this option to define the string.

string

Not Specified

/

http-match

String that you expect to see in the HTTP-GET requests of the traffic to be monitored.

string

Not Specified

interval

Detection interval in milliseconds.

integer

Minimum value: 500 Maximum value: 3600000

500

name

Link monitor name.

string

Not Specified

packet-size

Packet size of a TWAMP test session.

integer

Minimum value: 64 Maximum value: 1024

64

password

TWAMP controller password in authentication mode.

password

Not Specified

port

Port number of the traffic to be used to monitor the server.

integer

Minimum value: 1 Maximum value: 65535

0

probe-count

Number of most recent probes that should be used to calculate latency and jitter.

integer

Minimum value: 5 Maximum value: 30

30

probe-timeout

Time to wait before a probe packet is considered lost.

integer

Minimum value: 500 Maximum value: 5000

500

protocol

Protocols used to monitor the server.

option

-

ping

Option

Description

ping

PING link monitor.

tcp-echo

TCP echo link monitor.

udp-echo

UDP echo link monitor.

http

HTTP-GET link monitor.

twamp

TWAMP link monitor.

recoverytime

Number of successful responses received before server is considered recovered.

integer

Minimum value: 1 Maximum value: 3600

5

route <subnet>

Subnet to monitor.

IP and netmask (x.x.x.x/y).

string

Maximum length: 79

security-mode

Twamp controller security mode.

option

-

none

Option

Description

none

Unauthenticated mode.

authentication

Authenticated mode.

server <address>

IP address of the server(s) to be monitored.

Server address.

string

Maximum length: 79

server-config

Mode of server configuration.

option

-

default

Option

Description

default

All servers share the same attributes.

individual

Some attributes can be specified for individual servers.

service-detection

Only use monitor to read quality values. If enabled, static routes and cascade interfaces will not be updated.

option

-

disable

Option

Description

enable

Only use monitor for service-detection.

disable

Monitor will update routes/interfaces on link failure.

source-ip

Source IP address used in packet to the server.

ipv4-address-any

Not Specified

0.0.0.0

source-ip6

Source IPv6 address used in packet to the server.

ipv6-address

Not Specified

::

srcintf

Interface that receives the traffic to be monitored.

string

Not Specified

status

Enable/disable this link monitor.

option

-

enable

Option

Description

enable

Enable this link monitor.

disable

Disable this link monitor.

update-cascade-interface

Enable/disable update cascade interface.

option

-

enable

Option

Description

enable

Enable update cascade interface.

disable

Disable update cascade interface.

update-policy-route

Enable/disable updating the policy route.

option

-

enable

Option

Description

enable

Enable updating the policy route.

disable

Disable updating the policy route.

update-static-route

Enable/disable updating the static route.

option

-

enable

Option

Description

enable

Enable updating the static route.

disable

Disable updating the static route.

config server-list

Parameter

Description

Type

Size

Default

id

Server ID.

integer

Minimum value: 1 Maximum value: 32

0

dst

IP address of the server to be monitored.

string

Not Specified

protocol

Protocols used to monitor the server.

option

-

ping

Option

Description

ping

PING link monitor.

tcp-echo

TCP echo link monitor.

udp-echo

UDP echo link monitor.

http

HTTP-GET link monitor.

twamp

TWAMP link monitor.

port

Port number of the traffic to be used to monitor the server.

integer

Minimum value: 1 Maximum value: 65535

0

weight

Weight of the monitor to this dst.

integer

Minimum value: 0 Maximum value: 255

0

config system link-monitor

Configure Link Health Monitor.

config system link-monitor
    Description: Configure Link Health Monitor.
    edit <name>
        set addr-mode [ipv4|ipv6]
        set class-id {integer}
        set diffservcode {user}
        set fail-weight {integer}
        set failtime {integer}
        set gateway-ip {ipv4-address-any}
        set gateway-ip6 {ipv6-address}
        set ha-priority {integer}
        set http-agent {string}
        set http-get {string}
        set http-match {string}
        set interval {integer}
        set name {string}
        set packet-size {integer}
        set password {password}
        set port {integer}
        set probe-count {integer}
        set probe-timeout {integer}
        set protocol {option1}, {option2}, ...
        set recoverytime {integer}
        set route <subnet1>, <subnet2>, ...
        set security-mode [none|authentication]
        set server <address1>, <address2>, ...
        set server-config [default|individual]
        config server-list
            Description: Servers for link-monitor to monitor.
            edit <id>
                set id {integer}
                set dst {string}
                set protocol {option1}, {option2}, ...
                set port {integer}
                set weight {integer}
            next
        end
        set service-detection [enable|disable]
        set source-ip {ipv4-address-any}
        set source-ip6 {ipv6-address}
        set srcintf {string}
        set status [enable|disable]
        set update-cascade-interface [enable|disable]
        set update-policy-route [enable|disable]
        set update-static-route [enable|disable]
    next
end

config system link-monitor

Parameter

Description

Type

Size

Default

addr-mode

Address mode (IPv4 or IPv6).

option

-

ipv4

Option

Description

ipv4

IPv4 mode.

ipv6

IPv6 mode.

class-id

Traffic class ID.

integer

Minimum value: 0 Maximum value: 4294967295

0

diffservcode

Differentiated services code point (DSCP) in the IP header of the probe packet.

user

Not Specified

fail-weight

Threshold weight to trigger link failure alert.

integer

Minimum value: 0 Maximum value: 255

0

failtime

Number of retry attempts before the server is considered down.

integer

Minimum value: 1 Maximum value: 3600

5

gateway-ip

Gateway IP address used to probe the server.

ipv4-address-any

Not Specified

0.0.0.0

gateway-ip6

Gateway IPv6 address used to probe the server.

ipv6-address

Not Specified

::

ha-priority

HA election priority.

integer

Minimum value: 1 Maximum value: 50

1

http-agent

String in the http-agent field in the HTTP header.

string

Not Specified

Chrome/ Safari/

http-get

If you are monitoring an HTML server you can send an HTTP-GET request with a custom string. Use this option to define the string.

string

Not Specified

/

http-match

String that you expect to see in the HTTP-GET requests of the traffic to be monitored.

string

Not Specified

interval

Detection interval in milliseconds.

integer

Minimum value: 500 Maximum value: 3600000

500

name

Link monitor name.

string

Not Specified

packet-size

Packet size of a TWAMP test session.

integer

Minimum value: 64 Maximum value: 1024

64

password

TWAMP controller password in authentication mode.

password

Not Specified

port

Port number of the traffic to be used to monitor the server.

integer

Minimum value: 1 Maximum value: 65535

0

probe-count

Number of most recent probes that should be used to calculate latency and jitter.

integer

Minimum value: 5 Maximum value: 30

30

probe-timeout

Time to wait before a probe packet is considered lost.

integer

Minimum value: 500 Maximum value: 5000

500

protocol

Protocols used to monitor the server.

option

-

ping

Option

Description

ping

PING link monitor.

tcp-echo

TCP echo link monitor.

udp-echo

UDP echo link monitor.

http

HTTP-GET link monitor.

twamp

TWAMP link monitor.

recoverytime

Number of successful responses received before server is considered recovered.

integer

Minimum value: 1 Maximum value: 3600

5

route <subnet>

Subnet to monitor.

IP and netmask (x.x.x.x/y).

string

Maximum length: 79

security-mode

Twamp controller security mode.

option

-

none

Option

Description

none

Unauthenticated mode.

authentication

Authenticated mode.

server <address>

IP address of the server(s) to be monitored.

Server address.

string

Maximum length: 79

server-config

Mode of server configuration.

option

-

default

Option

Description

default

All servers share the same attributes.

individual

Some attributes can be specified for individual servers.

service-detection

Only use monitor to read quality values. If enabled, static routes and cascade interfaces will not be updated.

option

-

disable

Option

Description

enable

Only use monitor for service-detection.

disable

Monitor will update routes/interfaces on link failure.

source-ip

Source IP address used in packet to the server.

ipv4-address-any

Not Specified

0.0.0.0

source-ip6

Source IPv6 address used in packet to the server.

ipv6-address

Not Specified

::

srcintf

Interface that receives the traffic to be monitored.

string

Not Specified

status

Enable/disable this link monitor.

option

-

enable

Option

Description

enable

Enable this link monitor.

disable

Disable this link monitor.

update-cascade-interface

Enable/disable update cascade interface.

option

-

enable

Option

Description

enable

Enable update cascade interface.

disable

Disable update cascade interface.

update-policy-route

Enable/disable updating the policy route.

option

-

enable

Option

Description

enable

Enable updating the policy route.

disable

Disable updating the policy route.

update-static-route

Enable/disable updating the static route.

option

-

enable

Option

Description

enable

Enable updating the static route.

disable

Disable updating the static route.

config server-list

Parameter

Description

Type

Size

Default

id

Server ID.

integer

Minimum value: 1 Maximum value: 32

0

dst

IP address of the server to be monitored.

string

Not Specified

protocol

Protocols used to monitor the server.

option

-

ping

Option

Description

ping

PING link monitor.

tcp-echo

TCP echo link monitor.

udp-echo

UDP echo link monitor.

http

HTTP-GET link monitor.

twamp

TWAMP link monitor.

port

Port number of the traffic to be used to monitor the server.

integer

Minimum value: 1 Maximum value: 65535

0

weight

Weight of the monitor to this dst.

integer

Minimum value: 0 Maximum value: 255

0