Sample Trigger Script for the Configuration of Multiple Hot
Spare Servers
The following is an example of a trigger script that allows the configuration of multiple hot spare
servers. The purpose of this is to monitor the active servers; and if they both go down or become
unavailable, the hot spare servers will become active:
$commitChanges = FALSE;
$sp = srvpool::getByName(“sp00”);
$sv00 = si::getByName($sp, “sv00”);
$sv01 = si::getByName($sp, “sv01”);
$sv02 = si::getByName($sp, “sv02”);
$sv03 = si::getByName($sp, “sv03”);
// if both of these servers are down, make the other two servers active and
hot_spare these.
if ($sv00->getStatusResp() == 2 && $sv01->getStatusResp() == 2) {
$sv00->hot_spare = TRUE;
$sv01->hot_spare = TRUE;
$sv02->hot_spare = FALSE;
$sv03->hot_spare = FALSE;
$commitChanges = TRUE;
} else if ($sv02->getStatusResp() == 2 && $sv03->getStatusResp() == 2) {
$sv00->hot_spare = FALSE;
$sv01->hot_spare = FALSE;
$sv02->hot_spare = TRUE;
$sv03->hot_spare = TRUE;
$commitChanges = TRUE;
}
// avoid unnecessary commits by using a flag
if ($commitChanges == TRUE) {
$sv00->commit();
$sv01->commit();
$sv02->commit();
$sv03->commit();
}
Copyright © 2014 Coyote Point Systems, A Subsidiary of Fortinet, Inc.
All Rights Reserved.
697
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: ......