FortiADC
FortiADC enhances the scalability, performance, and security of your applications whether they are hosted on premises or in the cloud.
sfox
Staff
Staff
Article Id 195938

Description
In some cases, eqcollect needs to be run at the time a problem occurs.

Two Sample Scenarios for which scripts can be run to trigger eqcollect are:

  • Equalizer shows servers probes failing (server is consider "down")
  • HA peer fails to respond to heartbeats
In the above scenarios, the outages can be related to issues on the network, servers, or on the Equalizer.
 
In case the root cause is the Equalizer, the same scripts provided in this article can help to ensure that more detailed information is gathered the next time the problem occurs.


Scope
The Smart Control feature of the Equalizer uses PHP scripts to help solve the issue of collecting data during the time of the issue. We are able to create a Smart Control script that will automatically generate an eqcollect at the time ping fails to certain peers or servers.
Solution

Here is a sample script that will generate an eqcollect if it is not able to ping the HA peer.
We would only need to adjust the IP address for each scenario.

*******************************************
$out = adc::cli("ping 10.20.6.6");
if (strstr($out['cli_buf'], "0 packets received")) {
adc::cli("diags eqcollect local");}
*******************************************

If you see this error in the event log, increase the run_limit
*****************************
Mar 25 13:27:52 smartd 79000010: Disabling Smart Control 'test' because it took too long to execute. Turn off disable flag to re-enable.
*****************************

Note:**run_limit is only available in eqcli**
*************
eqcli sc-scname > run_limit seconds
: Set the Smart Control run limit.
***************
The recommendation would be to ping every 30 seconds with a run_limit of 25 seconds. If there is not enough time for the eqcollect to complete the smart control will disable. The failed ping and eqcollect should complete within 25 seconds.


Note:**Please contact a Fortinet support engineer before trying this script as it will write the files to /var/crash and can fill up the file system if not handled properly.**

 

Contributors