stats(string statName)
Description:
Get the value of the statistic named ‘
statName
’. The available statistics are the same as those displayed in the
CLI when using the
srvpool <name> stats
command.
Returns:
On success, the last-measured value of this statistic. On failure, an exception describing what went wrong:
invalid statistic name or no statistic specified.
Example:
$sp = srvpool::getByName(“sp00”);
if ($sp->stats(“TOTALPRCSD”) > 100) {
echo “Processed more than 100 requests through sp00”;
}
delete(optional Boolean forceFlag)
Description:
Delete this server pool. Can only be used on a server pool object which has been retrieved using
srvpool::getByName()
, and it must not have been modified since the last time that it was retrieved. If the
server pool is in use by another object in the system, the flag
forceFlag
must be set to ‘
TRUE
’ in order for it
to be deleted.
Returns:
Map containing message string with a status code. Status code will be 0 if the deletion was successful and non-
zero otherwise.
Example:
$sp = srvpool::getByName(“sp00”);
// Try to delete it, if it fails, force the deletion.
$value = $sp->delete();
if ($value[“status”] != 0) {
// Print out the reason for the failure, accessible using ‘lastrun’ command
echo “Failed to delete because: “, $value[“message”];
$value = $sp->delete(TRUE);
}
commit()
Description:
Push the changes to this server pool into the permanent configuration. If this server pool object was created
using
getByName()
, this operation is treated as a modify. If it was created using the new keyword, it is
treated as an addition.
Returns:
Map containing message string with a
status
code. Status code will be 0 if the commit was successful and
non-zero otherwise.
Example:
// Create a new server pool, then modify it
Copyright © 2014 Coyote Point Systems, A Subsidiary of Fortinet, Inc.
All Rights Reserved.
687
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: ......