HTTP:persist(dump_tbl)
Dumps the stick table content.
Syntax
HTTP:persist(t);
Arguments
| Name | Description |
|---|---|
|
t |
A table specifies the operation. |
Events
Applicable in the following events:
-
PERSISTENCE
-
HTTP_REQUEST (supported since version 7.2.x)
Example
when PERSISTENCE{
t={};
t["operation"] = "save_tbl";
t["hash_value"] = "246810";
t["srv_name"] = "pool1-3";
ret = HTTP: persist(t);
if ret then
debug("===server add success\n");
else
debug("===server add fail\n");
end
t={}
t["operation"] = "dump_tbl"
t[“index”] = 1
t[“count”] = 15
ret_tbl = HTTP:persist(t)
if ret_tbl then
for hash, srv in pairs(ret_tbl) do
debug("tbl hash %s srv %s\n",hash,srv)
end
end
}
“index”:
“count”:
Output:
Return A table include hash and server name
Supported Version
FortiADC version 5.4.x and later. In 7.2.x, function extended to HTTP_REQUEST events.