Hello,
I'm trying to upload CLI scripts from FG in 5.6.3 and I have noticed that when the script fails, the GUI reports the failure in the script execution history, but it does not tell me wtf the error is inside the script. As you can imagine, without this information in hand it is very difficult to locate CLI script errors in very large scripts. Does anybody know where/how can I locate this information?
Thanks
Andreas
Solved! Go to Solution.
Nominating a forum post submits a request to create a new Knowledge Article based on the forum post topic. Please ensure your nomination includes a solution within the reply.
Hi,
oupsss, use "diag debug cli 7". My mistake. I often use -1 in debug with application.
Can you tell me what you want to do?
Philippe
Hi,
Best way to do it: diag debug cli -1 in ssh windows then start you script.
All lines will start with 0: except errors! :)
Have a nice day!
Philippe
Thank you for the info. Looks like the level range is 1-8. level 0 would disable it.
sea5601-fg1 # diag debug cli -1 Invalid level, set to level 5 sea5601-fg1 # diag debug info debug output: disable console timestamp: disable console no user log message: disable CLI debug level: 5 sea5601-fg1 # diag debug cli ? <Integer> Debug level (0 - 8). sea5601-fg1 (interface) # edit internal10 new entry 'internal10' added sea5601-fg1 (internal10) # end Attribute 'vdom' MUST be set. child return 0x0 Command fail. Return code -56
Hi,
oupsss, use "diag debug cli 7". My mistake. I often use -1 in debug with application.
Can you tell me what you want to do?
Philippe
I just saw you're useful comment and quickly ran it manually to see what I can get when a command fails (in the example "end" without any interface config). Do you know any descriptions somewhere about what exactly those levels do differently from the others?
Hi,
Sorry, I can't find each level description. I think, more level number is high, more details you will have.
I use this command often when I write scripts. Very usefull!
Have a nice day.
Philippe
Thank you for that. It certainly helps. Although I was expecting that the GUI should provide this information, debug cli is much better that searching inside the script for typos.
Cheers
Andreas
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 |
---|---|
1732 | |
1106 | |
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.