Smart Control Configuration Guidelines
The Smart Control feature uses PHP as its underlying language. It is possible, however, to use this
feature with minimal PHP knowledge. Some facts about Smart Control scripts:
l
Each Smart Control script is wrapped inside of additional code prior to execution. The pur-
pose of this is to enable added protection and save the environment when a script runs. As a
result, tags such as “
<?php ?>
” not needed.
l
Smart Control scripts are intended to be run by the ADC in the background. That is, they
are generally not designed to produce output. However, if a script produces output, either
for debugging purposes, or because a PHP error has occurred, the output of the last time the
script was run can be seen using the
lastrun
command. (See
"Server Instance Class ("si")"
page 692 for a description).
l
If a script produces a PHP execution error while running, an error is logged in the ADC log,
however, the script continues to be executed as normal. The reason for this is that a dif-
ferent execution path may not produce the same error.
l
By default, any variables declared during execution of a script are saved for the subsequent
execution. If you would like to discard the environment between script executions, “
$save_
environment = FALSE;
” should be entered at the beginning of your script.
l
Because Smart Control is based on PHP, most PHP constructs will work. These are generally
for advanced users, however, they may be useful to create more robust scripts. For
example, try/catch blocks can be used for any function that prompts an exception, as
described below. However, although a script that catches these exceptions would be more
robust, users who are not familiar with PHP may want to look at the output produced by the
script, instead. (Exceptions will be displayed by the
lastrun
command).
Copyright © 2014 Coyote Point Systems, A Subsidiary of Fortinet, Inc.
All Rights Reserved.
683
Equalizer Administration Guide
Summary of Contents for Equalizer GX Series
Page 18: ......
Page 32: ...Overview 32 Copyright 2014 Coyote Point Systems A Subsidiary of Fortinet Inc ...
Page 42: ......
Page 52: ......
Page 64: ......
Page 72: ......
Page 76: ......
Page 228: ......
Page 238: ......
Page 476: ......
Page 492: ......
Page 530: ......
Page 614: ......
Page 626: ......
Page 638: ......
Page 678: ......
Page 732: ...Using SNMP Traps 732 Copyright 2014 Coyote Point Systems A Subsidiary of Fortinet Inc ...
Page 754: ......
Page 790: ......
Page 804: ......
Page 842: ......
Page 866: ......