Hi
I want to disable and enable fortigate port3 every friday on 09:00 AM. I configured the below snitch, trigger and action but it does not run. what is the problem?
config system automation-trigger
edit "Disable_LTE"
set trigger-type scheduled
set trigger-frequency weekly
set trigger-weekday friday
set trigger-hour 9
next
end
config system automation-stitch
edit "Up_Down_LTE"
set trigger "Disable_LTE"
config actions
edit 1
set action "Disable_LTE_Interface"
set required enable
next
edit 2
set action "Enable_LTE_Interface"
set delay 10
set required enable
next
end
next
end
config system automation-action
edit "Disable_LTE_Interface"
set action-type cli-script
set script "config system interface
edit port3
set status down"
set accprofile "super_admin"
next
end
config system automation-action
edit "Enable_LTE_Interface"
set action-type cli-script
set script "config system interface
edit port3
set status up"
set accprofile "super_admin"
next
end
Solved! Go to Solution.
Created on 01-16-2024 07:07 AM Edited on 01-16-2024 07:09 AM
In that case you will most likely also need to prepent the command to enter global config (where interfaces can be edited):
config global
config system interface
...
Anyway, try running the CLI debug while triggering the stitch. That may tell you what's wrong.
diag debug cli 7
diag debug enable
#=>#run the stitch no
Hi Reza
If you have multi vdom then I think you have to start the script by config global.
set script "config system interface
edit port3
set status down"
The CLI snippet is missing a new line with "end" to finish editing and save the change, in both cases.
Thanks. I have multiple vdoms. I used "end" for both up and down actions but they won't run. I also used config global but again no success.
Created on 01-16-2024 07:07 AM Edited on 01-16-2024 07:09 AM
In that case you will most likely also need to prepent the command to enter global config (where interfaces can be edited):
config global
config system interface
...
Anyway, try running the CLI debug while triggering the stitch. That may tell you what's wrong.
diag debug cli 7
diag debug enable
#=>#run the stitch no
Also, make sure that you run this automation script action under a super_admin profile .
Select Forum Responses to become Knowledge Articles!
Select the “Nominate to Knowledge Base” button to recommend a forum post to become a knowledge article.
User | Count |
---|---|
1737 | |
1108 | |
752 | |
447 | |
240 |
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2024 Fortinet, Inc. All Rights Reserved.