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
Содержание Equalizer GX Series
Страница 18: ......
Страница 32: ...Overview 32 Copyright 2014 Coyote Point Systems A Subsidiary of Fortinet Inc ...
Страница 42: ......
Страница 52: ......
Страница 64: ......
Страница 72: ......
Страница 76: ......
Страница 123: ...Copyright 2014 Coyote Point Systems A Subsidiary of Fortinet Inc All Rights Reserved 123 Equalizer Administration Guide ...
Страница 228: ......
Страница 238: ......
Страница 411: ...Copyright 2014 Coyote Point Systems A Subsidiary of Fortinet Inc All Rights Reserved 411 Equalizer Administration Guide ...
Страница 459: ...Copyright 2014 Coyote Point Systems A Subsidiary of Fortinet Inc All Rights Reserved 459 Equalizer Administration Guide ...
Страница 476: ......
Страница 492: ......
Страница 530: ......
Страница 614: ......
Страница 626: ......
Страница 638: ......
Страница 678: ......
Страница 732: ...Using SNMP Traps 732 Copyright 2014 Coyote Point Systems A Subsidiary of Fortinet Inc ...
Страница 754: ......
Страница 790: ......
Страница 804: ......
Страница 842: ......
Страница 847: ...Copyright 2014 Coyote Point Systems A Subsidiary of Fortinet Inc All Rights Reserved 847 Equalizer Administration Guide ...
Страница 866: ......