Fortinet white logo
Fortinet white logo

Administration Guide

Diagnosing automation stitches

Diagnosing automation stitches

Diagnose commands are available to:

  • Test an automation stitch
  • Enable or disable log dumping for automation stitches
  • Display the settings of every automation stitch
  • Display statistics on every automation stitch
To test an automation stitch:

diagnose automation test <automation-stitch-name>

Example:

# diagnose automation test HA-failover
automation test is done. stitch:HA-failover
To toggle log dumping:

diagnose test application autod 1

Examples:

# diagnose test application autod 1
autod log dumping is enabled
# diagnose test application autod 1
autod log dumping is disabled

autod logs dumping summary:
autod dumped total:7 logs, num of logids:4
To display the settings for all of the automation stitches:

diagnose test application autod 2

Example:

# diagnose test application autod 2
csf: enabled root:yes
total stitches activated: 3

stitch: Compromised-IP-Banned
        destinations: all
        trigger: Compromised-IP-Banned

	local hit: 0 relayed to: 0 relayed from: 0        
        actions:
		Compromised-IP-Banned_ban-ip type:ban-ip interval:0

stitch: HA-failover
        destinations: HA-failover_ha-cluster_25;
        trigger: HA-failover

	local hit: 0 relayed to: 0 relayed from: 0
        actions:
		HA-failover_email type:email interval:0
		subject: HA Failover
		mailto:admin@example.com;
 
stitch: rebooot
	destinations: all
	trigger: reboot
 
	local hit: 0 relayed to: 0 relayed from: 0
	actions:
		action1 type:alicloud-function interval:0
			delay:1 required:yes
			Account ID: id
			Region: region
			Function domain: fc.aliyuncs.com
			Version: versoin
			Service name: serv
			Function name: funcy
			headers:
To display statistic on all of the automation stitches:

diagnose test application autod 3

Example:

stitch: Compromised-IP-Banned
	local hit: 0 relayed to: 0 relayed from: 0
	last trigger:Wed Dec 31 20:00:00 1969
	last relay:Wed Dec 31 20:00:00 1969
	actions:
		Compromised-IP-Banned_ban-ip:
			done: 1 relayed to: 0 relayed from: 0
			last trigger:Wed Dec 31 20:00:00 1969
			last relay:

stitch: HA-failover
	local hit: 0 relayed to: 0 relayed from: 0
	last trigger:Thu May 24 11:35:22 2018
	last relay:Thu May 24 11:35:22 2018
	actions:
		HA-failover_email:
			done: 1 relayed to: 1 relayed from: 1
			last trigger:Thu May 24 11:35:22 2018
			last relay:Thu May 24 11:35:22 2018

stitch: rebooot
	local hit: 2 relayed to: 1 relayed from: 1
	last trigger:Fri May  3 13:30:56 2019
	last relay:Fri May  3 13:30:23 2019
	actions:
		action1
			done: 1 relayed to: 0 relayed from: 0
			last trigger:Fri May  3 13:30:56 2019
			last relay:

logid2stitch mapping:
id:20103  local hit: 0 relayed to: 0 relayed from: 0
	License Expiry
	lambada

id:32138  local hit: 2 relayed to: 1 relayed from: 1
	Compromised-IP-Banned
	HA-failover
	rebooot

action run cfg&stats:
total:2 cur:0 done:1 drop:1
	email:
		flags:10
		stats: total:1 cur:0 done:1 drop:0
	fortiexplorer-notification:
		flags:1
		stats: total:0 cur:0 done:0 drop:0
	alert:
		flags:0
		stats: total:0 cur:0 done:0 drop:0
	disable-ssid:
		flags:7
		stats: total:0 cur:0 done:0 drop:0
	quarantine:
		flags:7
		stats: total:0 cur:0 done:0 drop:0
	quarantine-forticlient:
		flags:4
		stats: total:0 cur:0 done:0 drop:0
	quarantine-nsx:
		flags:4
		stats: total:0 cur:0 done:0 drop:0
	ban-ip:
		flags:7
		stats: total:0 cur:0 done:0 drop:0
	aws-lambda:
		flags:11
		stats: total:0 cur:0 done:0 drop:0
	webhook:
		flags:11
		stats: total:0 cur:0 done:0 drop:0
	cli-script:
		flags:10
		stats: total:0 cur:0 done:0 drop:0
	azure-function:
		flags:11
		stats: total:1 cur:0 done:0 drop:1
	google-cloud-function:
		flags:11
		stats: total:0 cur:0 done:0 drop:0
	alicloud-function:
		flags:11
		stats: total:0 cur:0 done:0 drop:0

More Links

Diagnosing automation stitches

Diagnosing automation stitches

Diagnose commands are available to:

  • Test an automation stitch
  • Enable or disable log dumping for automation stitches
  • Display the settings of every automation stitch
  • Display statistics on every automation stitch
To test an automation stitch:

diagnose automation test <automation-stitch-name>

Example:

# diagnose automation test HA-failover
automation test is done. stitch:HA-failover
To toggle log dumping:

diagnose test application autod 1

Examples:

# diagnose test application autod 1
autod log dumping is enabled
# diagnose test application autod 1
autod log dumping is disabled

autod logs dumping summary:
autod dumped total:7 logs, num of logids:4
To display the settings for all of the automation stitches:

diagnose test application autod 2

Example:

# diagnose test application autod 2
csf: enabled root:yes
total stitches activated: 3

stitch: Compromised-IP-Banned
        destinations: all
        trigger: Compromised-IP-Banned

	local hit: 0 relayed to: 0 relayed from: 0        
        actions:
		Compromised-IP-Banned_ban-ip type:ban-ip interval:0

stitch: HA-failover
        destinations: HA-failover_ha-cluster_25;
        trigger: HA-failover

	local hit: 0 relayed to: 0 relayed from: 0
        actions:
		HA-failover_email type:email interval:0
		subject: HA Failover
		mailto:admin@example.com;
 
stitch: rebooot
	destinations: all
	trigger: reboot
 
	local hit: 0 relayed to: 0 relayed from: 0
	actions:
		action1 type:alicloud-function interval:0
			delay:1 required:yes
			Account ID: id
			Region: region
			Function domain: fc.aliyuncs.com
			Version: versoin
			Service name: serv
			Function name: funcy
			headers:
To display statistic on all of the automation stitches:

diagnose test application autod 3

Example:

stitch: Compromised-IP-Banned
	local hit: 0 relayed to: 0 relayed from: 0
	last trigger:Wed Dec 31 20:00:00 1969
	last relay:Wed Dec 31 20:00:00 1969
	actions:
		Compromised-IP-Banned_ban-ip:
			done: 1 relayed to: 0 relayed from: 0
			last trigger:Wed Dec 31 20:00:00 1969
			last relay:

stitch: HA-failover
	local hit: 0 relayed to: 0 relayed from: 0
	last trigger:Thu May 24 11:35:22 2018
	last relay:Thu May 24 11:35:22 2018
	actions:
		HA-failover_email:
			done: 1 relayed to: 1 relayed from: 1
			last trigger:Thu May 24 11:35:22 2018
			last relay:Thu May 24 11:35:22 2018

stitch: rebooot
	local hit: 2 relayed to: 1 relayed from: 1
	last trigger:Fri May  3 13:30:56 2019
	last relay:Fri May  3 13:30:23 2019
	actions:
		action1
			done: 1 relayed to: 0 relayed from: 0
			last trigger:Fri May  3 13:30:56 2019
			last relay:

logid2stitch mapping:
id:20103  local hit: 0 relayed to: 0 relayed from: 0
	License Expiry
	lambada

id:32138  local hit: 2 relayed to: 1 relayed from: 1
	Compromised-IP-Banned
	HA-failover
	rebooot

action run cfg&stats:
total:2 cur:0 done:1 drop:1
	email:
		flags:10
		stats: total:1 cur:0 done:1 drop:0
	fortiexplorer-notification:
		flags:1
		stats: total:0 cur:0 done:0 drop:0
	alert:
		flags:0
		stats: total:0 cur:0 done:0 drop:0
	disable-ssid:
		flags:7
		stats: total:0 cur:0 done:0 drop:0
	quarantine:
		flags:7
		stats: total:0 cur:0 done:0 drop:0
	quarantine-forticlient:
		flags:4
		stats: total:0 cur:0 done:0 drop:0
	quarantine-nsx:
		flags:4
		stats: total:0 cur:0 done:0 drop:0
	ban-ip:
		flags:7
		stats: total:0 cur:0 done:0 drop:0
	aws-lambda:
		flags:11
		stats: total:0 cur:0 done:0 drop:0
	webhook:
		flags:11
		stats: total:0 cur:0 done:0 drop:0
	cli-script:
		flags:10
		stats: total:0 cur:0 done:0 drop:0
	azure-function:
		flags:11
		stats: total:1 cur:0 done:0 drop:1
	google-cloud-function:
		flags:11
		stats: total:0 cur:0 done:0 drop:0
	alicloud-function:
		flags:11
		stats: total:0 cur:0 done:0 drop:0