mirror of
https://github.com/opnsense/plugins.git
synced 2026-04-28 16:41:46 -05:00
net/haproxy: improve stick-table support
This commit is contained in:
@@ -20,12 +20,14 @@ Added:
|
||||
* add support for HTTP compression (#4867)
|
||||
* add all action keywords for http-request/-response and tcp-request/-response rules
|
||||
* add "enabled" field to rules
|
||||
* add support for all stick-table data types
|
||||
|
||||
Changed:
|
||||
* upgrade to HAProxy 3.2 release series (#5147)
|
||||
* refactor http/tcp rules to make extensions easier
|
||||
* rename some labels in rules
|
||||
* change LUA boolean conversion (see tune.lua.bool-sample-conversion)
|
||||
* stick-table "size" and "expiration time" are no longer advanced options (now always visible)
|
||||
|
||||
4.6
|
||||
|
||||
|
||||
@@ -249,20 +249,39 @@
|
||||
<id>backend.stickiness_dataTypes</id>
|
||||
<label>Stored data types</label>
|
||||
<type>select_multiple</type>
|
||||
<help><![CDATA[This is used to store additional information in the stick-table. It may be used by ACLs in order to control various criteria related to the activity of the client matching the stick-table. Note that this directly impacts memory usage. See the <a target="_blank" href="http://docs.haproxy.org/3.2/configuration.html#stick-table">HAProxy documentation</a> for a full description.]]></help>
|
||||
<help><![CDATA[This is used to store additional information in the stick-table. It may be used by ACLs in order to control various criteria related to the activity of the client matching the stick-table. Note that this directly impacts memory usage. See the <a target="_blank" href="http://docs.haproxy.org/3.2/configuration.html#11.1">HAProxy documentation</a> for a full description.]]></help>
|
||||
</field>
|
||||
<field>
|
||||
<id>backend.stickiness_expire</id>
|
||||
<label>Expiration time</label>
|
||||
<type>text</type>
|
||||
<help><![CDATA[Enter a number followed by one of the supported suffixes "d" (days), "h" (hour), "m" (minute), "s" (seconds), "ms" (miliseconds). This configures the maximum duration of an entry in the stick-table since it was last created, refreshed or matched. The maximum duration is slightly above 24 days.]]></help>
|
||||
<advanced>true</advanced>
|
||||
</field>
|
||||
<field>
|
||||
<id>backend.stickiness_size</id>
|
||||
<label>Size</label>
|
||||
<label>Table size</label>
|
||||
<type>text</type>
|
||||
<help><![CDATA[Enter a number followed by one of the supported suffixes "k", "m", "g". This configures the maximum number of entries that can fit in the table. This value directly impacts memory usage. Count approximately 50 bytes per entry, plus the size of a string if any.]]></help>
|
||||
</field>
|
||||
<field>
|
||||
<id>backend.stickiness_length</id>
|
||||
<label>Max. data length</label>
|
||||
<type>text</type>
|
||||
<help><![CDATA[Specify the maximum length for a value in the stick-table. If the value is larger than this value it will be truncated before being stored. Depending on the stick-table type this repesents either characters or bytes.]]></help>
|
||||
<advanced>true</advanced>
|
||||
</field>
|
||||
<field>
|
||||
<id>backend.stickiness_bytesInRatePeriod</id>
|
||||
<label>Bytes in rate period</label>
|
||||
<type>text</type>
|
||||
<help><![CDATA[The length of the period over which the average is measured. It reports the average incoming bytes rate over that period, in bytes per period. Defaults to milliseconds. Optionally the unit may be specified as either "d", "h", "m", "s", "ms" or "us".]]></help>
|
||||
<advanced>true</advanced>
|
||||
</field>
|
||||
<field>
|
||||
<id>backend.stickiness_bytesOutRatePeriod</id>
|
||||
<label>Bytes out rate period</label>
|
||||
<type>text</type>
|
||||
<help><![CDATA[The length of the period over which the average is measured. It reports the average outgoing bytes rate over that period, in bytes per period. Defaults to milliseconds. Optionally the unit may be specified as either "d", "h", "m", "s", "ms" or "us".]]></help>
|
||||
<advanced>true</advanced>
|
||||
</field>
|
||||
<field>
|
||||
@@ -285,10 +304,31 @@
|
||||
<advanced>true</advanced>
|
||||
</field>
|
||||
<field>
|
||||
<id>backend.stickiness_sessRatePeriod</id>
|
||||
<label>Session rate period</label>
|
||||
<id>backend.stickiness_glitchRatePeriod</id>
|
||||
<label>Glitch rate period</label>
|
||||
<type>text</type>
|
||||
<help><![CDATA[The length of the period over which the average is measured. It reports the average incoming session rate over that period, in sessions per period. Defaults to milliseconds. Optionally the unit may be specified as either "d", "h", "m", "s", "ms" or "us".]]></help>
|
||||
<help><![CDATA[The length of the period over which the average is measured. It reports the average front glitches rate over that period. Defaults to milliseconds. Optionally the unit may be specified as either "d", "h", "m", "s", "ms" or "us".]]></help>
|
||||
<advanced>true</advanced>
|
||||
</field>
|
||||
<field>
|
||||
<id>backend.stickiness_gpcElements</id>
|
||||
<label>GPC elements</label>
|
||||
<type>text</type>
|
||||
<help><![CDATA[The number of array elements that will be used for the General Purpose Counter. This is limited to a maximum of 100 elements, ranging from 0 to 99.]]></help>
|
||||
<advanced>true</advanced>
|
||||
</field>
|
||||
<field>
|
||||
<id>backend.stickiness_gpcRatePeriod</id>
|
||||
<label>GPC rate period</label>
|
||||
<type>text</type>
|
||||
<help><![CDATA[The length of the period over which the average is measured. Most of the time it will be used to measure the frequency of occurrence of certain events. Defaults to milliseconds. Optionally the unit may be specified as either "d", "h", "m", "s", "ms" or "us".]]></help>
|
||||
<advanced>true</advanced>
|
||||
</field>
|
||||
<field>
|
||||
<id>backend.stickiness_gptElements</id>
|
||||
<label>GPT elements</label>
|
||||
<type>text</type>
|
||||
<help><![CDATA[The number of array elements that will be used for the General Purpose Tag. This is limited to a maximum of 100 elements, ranging from 0 to 99.]]></help>
|
||||
<advanced>true</advanced>
|
||||
</field>
|
||||
<field>
|
||||
@@ -306,17 +346,17 @@
|
||||
<advanced>true</advanced>
|
||||
</field>
|
||||
<field>
|
||||
<id>backend.stickiness_bytesInRatePeriod</id>
|
||||
<label>Bytes in rate period</label>
|
||||
<id>backend.stickiness_httpFailRatePeriod</id>
|
||||
<label>HTTP fail rate period</label>
|
||||
<type>text</type>
|
||||
<help><![CDATA[The length of the period over which the average is measured. It reports the average incoming bytes rate over that period, in bytes per period. Defaults to milliseconds. Optionally the unit may be specified as either "d", "h", "m", "s", "ms" or "us".]]></help>
|
||||
<help><![CDATA[The length of the period over which the average is measured. It reports the average HTTP response fail error rate over that period, in requests per period. Defaults to milliseconds. Optionally the unit may be specified as either "d", "h", "m", "s", "ms" or "us".]]></help>
|
||||
<advanced>true</advanced>
|
||||
</field>
|
||||
<field>
|
||||
<id>backend.stickiness_bytesOutRatePeriod</id>
|
||||
<label>Bytes out rate period</label>
|
||||
<id>backend.stickiness_sessRatePeriod</id>
|
||||
<label>Session rate period</label>
|
||||
<type>text</type>
|
||||
<help><![CDATA[The length of the period over which the average is measured. It reports the average outgoing bytes rate over that period, in bytes per period. Defaults to milliseconds. Optionally the unit may be specified as either "d", "h", "m", "s", "ms" or "us".]]></help>
|
||||
<help><![CDATA[The length of the period over which the average is measured. It reports the average incoming session rate over that period, in sessions per period. Defaults to milliseconds. Optionally the unit may be specified as either "d", "h", "m", "s", "ms" or "us".]]></help>
|
||||
<advanced>true</advanced>
|
||||
</field>
|
||||
<field>
|
||||
|
||||
@@ -350,28 +350,26 @@
|
||||
<id>frontend.stickiness_pattern</id>
|
||||
<label>Table type</label>
|
||||
<type>dropdown</type>
|
||||
<help><![CDATA[Choose the type of data that should be stored in this stick-table. Note that this stick-table cannot be used for session persistence, it is only used to store additional per-connection data (select below). See the <a target="_blank" href="http://docs.haproxy.org/3.2/configuration.html#stick-table">HAProxy documentation</a> for further information.]]></help>
|
||||
<help><![CDATA[Choose the type of data that should be stored in this stick-table. Note that this stick-table cannot be used for session persistence, it is only used to store additional per-connection data (select below). See the <a target="_blank" href="http://docs.haproxy.org/3.2/configuration.html#11.1">HAProxy documentation</a> for further information.]]></help>
|
||||
<hint>Choose a stick-table type.</hint>
|
||||
</field>
|
||||
<field>
|
||||
<id>frontend.stickiness_dataTypes</id>
|
||||
<label>Stored data types</label>
|
||||
<type>select_multiple</type>
|
||||
<help><![CDATA[This is used to store additional information in the stick-table. It may be used by ACLs in order to control various criteria related to the activity of the client matching the stick-table. Note that this directly impacts memory usage. See the <a target="_blank" href="http://docs.haproxy.org/3.2/configuration.html#stick-table">HAProxy documentation</a> for a full description.]]></help>
|
||||
<help><![CDATA[This is used to store additional information in the stick-table. It may be used by ACLs in order to control various criteria related to the activity of the client matching the stick-table. Note that this directly impacts memory usage. See the <a target="_blank" href="http://docs.haproxy.org/3.2/configuration.html#11.1">HAProxy documentation</a> for a full description.]]></help>
|
||||
</field>
|
||||
<field>
|
||||
<id>frontend.stickiness_expire</id>
|
||||
<label>Expiration time</label>
|
||||
<type>text</type>
|
||||
<help><![CDATA[Enter a number followed by one of the supported suffixes "d" (days), "h" (hour), "m" (minute), "s" (seconds), "ms" (miliseconds). This configures the maximum duration of an entry in the stick-table since it was last created, refreshed or matched. The maximum duration is slightly above 24 days.]]></help>
|
||||
<advanced>true</advanced>
|
||||
</field>
|
||||
<field>
|
||||
<id>frontend.stickiness_size</id>
|
||||
<label>Size</label>
|
||||
<label>Table size</label>
|
||||
<type>text</type>
|
||||
<help><![CDATA[Enter a number followed by one of the supported suffixes "k", "m", "g". This configures the maximum number of entries that can fit in the table. This value directly impacts memory usage. Count approximately 50 bytes per entry, plus the size of a string if any.]]></help>
|
||||
<advanced>true</advanced>
|
||||
</field>
|
||||
<field>
|
||||
<id>frontend.stickiness_counter</id>
|
||||
@@ -394,6 +392,20 @@
|
||||
<help><![CDATA[Specify the maximum length for a value in the stick-table. If the value is larger than this value it will be truncated before being stored. Depending on the stick-table type this repesents either characters or bytes.]]></help>
|
||||
<advanced>true</advanced>
|
||||
</field>
|
||||
<field>
|
||||
<id>frontend.stickiness_bytesInRatePeriod</id>
|
||||
<label>Bytes in rate period</label>
|
||||
<type>text</type>
|
||||
<help><![CDATA[The length of the period over which the average is measured. It reports the average incoming bytes rate over that period, in bytes per period. Defaults to milliseconds. Optionally the unit may be specified as either "d", "h", "m", "s", "ms" or "us".]]></help>
|
||||
<advanced>true</advanced>
|
||||
</field>
|
||||
<field>
|
||||
<id>frontend.stickiness_bytesOutRatePeriod</id>
|
||||
<label>Bytes out rate period</label>
|
||||
<type>text</type>
|
||||
<help><![CDATA[The length of the period over which the average is measured. It reports the average outgoing bytes rate over that period, in bytes per period. Defaults to milliseconds. Optionally the unit may be specified as either "d", "h", "m", "s", "ms" or "us".]]></help>
|
||||
<advanced>true</advanced>
|
||||
</field>
|
||||
<field>
|
||||
<id>frontend.stickiness_connRatePeriod</id>
|
||||
<label>Connection rate period</label>
|
||||
@@ -402,10 +414,31 @@
|
||||
<advanced>true</advanced>
|
||||
</field>
|
||||
<field>
|
||||
<id>frontend.stickiness_sessRatePeriod</id>
|
||||
<label>Session rate period</label>
|
||||
<id>frontend.stickiness_glitchRatePeriod</id>
|
||||
<label>Glitch rate period</label>
|
||||
<type>text</type>
|
||||
<help><![CDATA[The length of the period over which the average is measured. It reports the average incoming session rate over that period, in sessions per period. Defaults to milliseconds. Optionally the unit may be specified as either "d", "h", "m", "s", "ms" or "us".]]></help>
|
||||
<help><![CDATA[The length of the period over which the average is measured. It reports the average front glitches rate over that period. Defaults to milliseconds. Optionally the unit may be specified as either "d", "h", "m", "s", "ms" or "us".]]></help>
|
||||
<advanced>true</advanced>
|
||||
</field>
|
||||
<field>
|
||||
<id>frontend.stickiness_gpcElements</id>
|
||||
<label>GPC elements</label>
|
||||
<type>text</type>
|
||||
<help><![CDATA[The number of array elements that will be used for the General Purpose Counter. This is limited to a maximum of 100 elements, ranging from 0 to 99.]]></help>
|
||||
<advanced>true</advanced>
|
||||
</field>
|
||||
<field>
|
||||
<id>frontend.stickiness_gpcRatePeriod</id>
|
||||
<label>GPC rate period</label>
|
||||
<type>text</type>
|
||||
<help><![CDATA[The length of the period over which the average is measured. Most of the time it will be used to measure the frequency of occurrence of certain events. Defaults to milliseconds. Optionally the unit may be specified as either "d", "h", "m", "s", "ms" or "us".]]></help>
|
||||
<advanced>true</advanced>
|
||||
</field>
|
||||
<field>
|
||||
<id>frontend.stickiness_gptElements</id>
|
||||
<label>GPT elements</label>
|
||||
<type>text</type>
|
||||
<help><![CDATA[The number of array elements that will be used for the General Purpose Tag. This is limited to a maximum of 100 elements, ranging from 0 to 99.]]></help>
|
||||
<advanced>true</advanced>
|
||||
</field>
|
||||
<field>
|
||||
@@ -423,17 +456,17 @@
|
||||
<advanced>true</advanced>
|
||||
</field>
|
||||
<field>
|
||||
<id>frontend.stickiness_bytesInRatePeriod</id>
|
||||
<label>Bytes in rate period</label>
|
||||
<id>frontend.stickiness_httpFailRatePeriod</id>
|
||||
<label>HTTP fail rate period</label>
|
||||
<type>text</type>
|
||||
<help><![CDATA[The length of the period over which the average is measured. It reports the average incoming bytes rate over that period, in bytes per period. Defaults to milliseconds. Optionally the unit may be specified as either "d", "h", "m", "s", "ms" or "us".]]></help>
|
||||
<help><![CDATA[The length of the period over which the average is measured. It reports the average HTTP response fail error rate over that period, in requests per period. Defaults to milliseconds. Optionally the unit may be specified as either "d", "h", "m", "s", "ms" or "us".]]></help>
|
||||
<advanced>true</advanced>
|
||||
</field>
|
||||
<field>
|
||||
<id>frontend.stickiness_bytesOutRatePeriod</id>
|
||||
<label>Bytes out rate period</label>
|
||||
<id>frontend.stickiness_sessRatePeriod</id>
|
||||
<label>Session rate period</label>
|
||||
<type>text</type>
|
||||
<help><![CDATA[The length of the period over which the average is measured. It reports the average outgoing bytes rate over that period, in bytes per period. Defaults to milliseconds. Optionally the unit may be specified as either "d", "h", "m", "s", "ms" or "us".]]></help>
|
||||
<help><![CDATA[The length of the period over which the average is measured. It reports the average incoming session rate over that period, in sessions per period. Defaults to milliseconds. Optionally the unit may be specified as either "d", "h", "m", "s", "ms" or "us".]]></help>
|
||||
<advanced>true</advanced>
|
||||
</field>
|
||||
<field>
|
||||
|
||||
@@ -758,19 +758,32 @@
|
||||
<Required>N</Required>
|
||||
<Multiple>Y</Multiple>
|
||||
<OptionValues>
|
||||
<conn_cnt>Connection count</conn_cnt>
|
||||
<conn_cur>Current connections</conn_cur>
|
||||
<conn_rate>Connection rate</conn_rate>
|
||||
<sess_cnt>Session count</sess_cnt>
|
||||
<sess_rate>Session rate</sess_rate>
|
||||
<http_req_cnt>HTTP request count</http_req_cnt>
|
||||
<http_req_rate>HTTP request rate</http_req_rate>
|
||||
<http_err_cnt>HTTP error count</http_err_cnt>
|
||||
<http_err_rate>HTTP error rate</http_err_rate>
|
||||
<bytes_in_cnt>Bytes in count (client to server)</bytes_in_cnt>
|
||||
<bytes_in_rate>Bytes in rate (client to server)</bytes_in_rate>
|
||||
<bytes_out_cnt>Bytes out count (server to client)</bytes_out_cnt>
|
||||
<bytes_out_rate>Bytes out rate (server to client)</bytes_out_rate>
|
||||
<conn_cnt>Connection count (total)</conn_cnt>
|
||||
<conn_cur>Connection count (current)</conn_cur>
|
||||
<conn_rate>Connection rate</conn_rate>
|
||||
<glitch_cnt>Glitch count</glitch_cnt>
|
||||
<glitch_rate>Glitch rate</glitch_rate>
|
||||
<gpc>General Purpose Counters (array of elements)</gpc>
|
||||
<gpc_rate>General Purpose Counter rate</gpc_rate>
|
||||
<gpc0>gpc0</gpc0>
|
||||
<gpc0_rate>gpc0 rate</gpc0_rate>
|
||||
<gpc1>gpc1</gpc1>
|
||||
<gpc1_rate>gpc1 rate</gpc1_rate>
|
||||
<gpt>General Purpose Tags (array of elements)</gpt>
|
||||
<gpt0>gpt0</gpt0>
|
||||
<http_err_cnt>HTTP error count</http_err_cnt>
|
||||
<http_err_rate>HTTP error rate</http_err_rate>
|
||||
<http_fail_cnt>HTTP fail count</http_fail_cnt>
|
||||
<http_fail_rate>HTTP fail rate</http_fail_rate>
|
||||
<http_req_cnt>HTTP request count</http_req_cnt>
|
||||
<http_req_rate>HTTP request rate</http_req_rate>
|
||||
<server_id>Server ID</server_id>
|
||||
<sess_cnt>Session count</sess_cnt>
|
||||
<sess_rate>Session rate</sess_rate>
|
||||
</OptionValues>
|
||||
</stickiness_dataTypes>
|
||||
<stickiness_expire type="TextField">
|
||||
@@ -839,6 +852,38 @@
|
||||
<ValidationMessage>Should be a number between 1 and 8 characters, optionally followed by either "d", "h", "m", "s", "ms" or "us".</ValidationMessage>
|
||||
<Required>N</Required>
|
||||
</stickiness_bytesOutRatePeriod>
|
||||
<stickiness_gpcElements type="IntegerField">
|
||||
<Default>0</Default>
|
||||
<MinimumValue>0</MinimumValue>
|
||||
<MaximumValue>99</MaximumValue>
|
||||
<ValidationMessage>Please specify a value between 0 and 99.</ValidationMessage>
|
||||
<Required>N</Required>
|
||||
</stickiness_gpcElements>
|
||||
<stickiness_gpcRatePeriod type="TextField">
|
||||
<Default>1m</Default>
|
||||
<Mask>/^([0-9]{1,8}(?:us|ms|s|m|h|d)?)/u</Mask>
|
||||
<ValidationMessage>Should be a number between 1 and 8 characters, optionally followed by either "d", "h", "m", "s", "ms" or "us".</ValidationMessage>
|
||||
<Required>N</Required>
|
||||
</stickiness_gpcRatePeriod>
|
||||
<stickiness_gptElements type="IntegerField">
|
||||
<Default>0</Default>
|
||||
<MinimumValue>0</MinimumValue>
|
||||
<MaximumValue>99</MaximumValue>
|
||||
<ValidationMessage>Please specify a value between 0 and 99.</ValidationMessage>
|
||||
<Required>N</Required>
|
||||
</stickiness_gptElements>
|
||||
<stickiness_httpFailRatePeriod type="TextField">
|
||||
<Default>1m</Default>
|
||||
<Mask>/^([0-9]{1,8}(?:us|ms|s|m|h|d)?)/u</Mask>
|
||||
<ValidationMessage>Should be a number between 1 and 8 characters, optionally followed by either "d", "h", "m", "s", "ms" or "us".</ValidationMessage>
|
||||
<Required>N</Required>
|
||||
</stickiness_httpFailRatePeriod>
|
||||
<stickiness_glitchRatePeriod type="TextField">
|
||||
<Default>1m</Default>
|
||||
<Mask>/^([0-9]{1,8}(?:us|ms|s|m|h|d)?)/u</Mask>
|
||||
<ValidationMessage>Should be a number between 1 and 8 characters, optionally followed by either "d", "h", "m", "s", "ms" or "us".</ValidationMessage>
|
||||
<Required>N</Required>
|
||||
</stickiness_glitchRatePeriod>
|
||||
<http2Enabled type="BooleanField">
|
||||
<Default>1</Default>
|
||||
<Required>N</Required>
|
||||
@@ -1169,19 +1214,32 @@
|
||||
<Required>N</Required>
|
||||
<Multiple>Y</Multiple>
|
||||
<OptionValues>
|
||||
<conn_cnt>Connection count</conn_cnt>
|
||||
<conn_cur>Current connections</conn_cur>
|
||||
<conn_rate>Connection rate</conn_rate>
|
||||
<sess_cnt>Session count</sess_cnt>
|
||||
<sess_rate>Session rate</sess_rate>
|
||||
<http_req_cnt>HTTP request count</http_req_cnt>
|
||||
<http_req_rate>HTTP request rate</http_req_rate>
|
||||
<http_err_cnt>HTTP error count</http_err_cnt>
|
||||
<http_err_rate>HTTP error rate</http_err_rate>
|
||||
<bytes_in_cnt>Bytes in count (client to server)</bytes_in_cnt>
|
||||
<bytes_in_rate>Bytes in rate (client to server)</bytes_in_rate>
|
||||
<bytes_out_cnt>Bytes out count (server to client)</bytes_out_cnt>
|
||||
<bytes_out_rate>Bytes out rate (server to client)</bytes_out_rate>
|
||||
<conn_cnt>Connection count (total)</conn_cnt>
|
||||
<conn_cur>Connection count (current)</conn_cur>
|
||||
<conn_rate>Connection rate</conn_rate>
|
||||
<glitch_cnt>Glitch count</glitch_cnt>
|
||||
<glitch_rate>Glitch rate</glitch_rate>
|
||||
<gpc>General Purpose Counters (array of elements)</gpc>
|
||||
<gpc_rate>General Purpose Counter rate</gpc_rate>
|
||||
<gpc0>gpc0</gpc0>
|
||||
<gpc0_rate>gpc0 rate</gpc0_rate>
|
||||
<gpc1>gpc1</gpc1>
|
||||
<gpc1_rate>gpc1 rate</gpc1_rate>
|
||||
<gpt>General Purpose Tags (array of elements)</gpt>
|
||||
<gpt0>gpt0</gpt0>
|
||||
<http_err_cnt>HTTP error count</http_err_cnt>
|
||||
<http_err_rate>HTTP error rate</http_err_rate>
|
||||
<http_fail_cnt>HTTP fail count</http_fail_cnt>
|
||||
<http_fail_rate>HTTP fail rate</http_fail_rate>
|
||||
<http_req_cnt>HTTP request count</http_req_cnt>
|
||||
<http_req_rate>HTTP request rate</http_req_rate>
|
||||
<server_id>Server ID</server_id>
|
||||
<sess_cnt>Session count</sess_cnt>
|
||||
<sess_rate>Session rate</sess_rate>
|
||||
</OptionValues>
|
||||
</stickiness_dataTypes>
|
||||
<stickiness_expire type="TextField">
|
||||
@@ -1209,6 +1267,12 @@
|
||||
<ValidationMessage>Please specify a value between 1 and 10000.</ValidationMessage>
|
||||
<Required>N</Required>
|
||||
</stickiness_cookielength>
|
||||
<stickiness_length type="IntegerField">
|
||||
<MinimumValue>1</MinimumValue>
|
||||
<MaximumValue>16384</MaximumValue>
|
||||
<ValidationMessage>Please specify a value between 1 and 16384.</ValidationMessage>
|
||||
<Required>N</Required>
|
||||
</stickiness_length>
|
||||
<stickiness_connRatePeriod type="TextField">
|
||||
<Default>10s</Default>
|
||||
<Mask>/^([0-9]{1,8}(?:us|ms|s|m|h|d)?)/u</Mask>
|
||||
@@ -1245,6 +1309,38 @@
|
||||
<ValidationMessage>Should be a number between 1 and 8 characters, optionally followed by either "d", "h", "m", "s", "ms" or "us".</ValidationMessage>
|
||||
<Required>N</Required>
|
||||
</stickiness_bytesOutRatePeriod>
|
||||
<stickiness_gpcElements type="IntegerField">
|
||||
<Default>0</Default>
|
||||
<MinimumValue>0</MinimumValue>
|
||||
<MaximumValue>99</MaximumValue>
|
||||
<ValidationMessage>Please specify a value between 0 and 99.</ValidationMessage>
|
||||
<Required>N</Required>
|
||||
</stickiness_gpcElements>
|
||||
<stickiness_gptElements type="IntegerField">
|
||||
<Default>0</Default>
|
||||
<MinimumValue>0</MinimumValue>
|
||||
<MaximumValue>99</MaximumValue>
|
||||
<ValidationMessage>Please specify a value between 0 and 99.</ValidationMessage>
|
||||
<Required>N</Required>
|
||||
</stickiness_gptElements>
|
||||
<stickiness_gpcRatePeriod type="TextField">
|
||||
<Default>1m</Default>
|
||||
<Mask>/^([0-9]{1,8}(?:us|ms|s|m|h|d)?)/u</Mask>
|
||||
<ValidationMessage>Should be a number between 1 and 8 characters, optionally followed by either "d", "h", "m", "s", "ms" or "us".</ValidationMessage>
|
||||
<Required>N</Required>
|
||||
</stickiness_gpcRatePeriod>
|
||||
<stickiness_httpFailRatePeriod type="TextField">
|
||||
<Default>1m</Default>
|
||||
<Mask>/^([0-9]{1,8}(?:us|ms|s|m|h|d)?)/u</Mask>
|
||||
<ValidationMessage>Should be a number between 1 and 8 characters, optionally followed by either "d", "h", "m", "s", "ms" or "us".</ValidationMessage>
|
||||
<Required>N</Required>
|
||||
</stickiness_httpFailRatePeriod>
|
||||
<stickiness_glitchRatePeriod type="TextField">
|
||||
<Default>1m</Default>
|
||||
<Mask>/^([0-9]{1,8}(?:us|ms|s|m|h|d)?)/u</Mask>
|
||||
<ValidationMessage>Should be a number between 1 and 8 characters, optionally followed by either "d", "h", "m", "s", "ms" or "us".</ValidationMessage>
|
||||
<Required>N</Required>
|
||||
</stickiness_glitchRatePeriod>
|
||||
<basicAuthEnabled type="BooleanField">
|
||||
<Default>0</Default>
|
||||
<Required>N</Required>
|
||||
|
||||
@@ -694,18 +694,28 @@
|
||||
{% set stickiness_datatypes = [] %}
|
||||
{% for datatype in proxy.stickiness_dataTypes.split(",") %}
|
||||
{# # add time period to all types where this is required #}
|
||||
{% if datatype == 'conn_rate' %}
|
||||
{% do stickiness_datatypes.append(datatype ~ '(' ~ proxy.stickiness_connRatePeriod ~ ')') %}
|
||||
{% elif datatype == 'sess_rate' %}
|
||||
{% do stickiness_datatypes.append(datatype ~ '(' ~ proxy.stickiness_sessRatePeriod ~ ')') %}
|
||||
{% elif datatype == 'http_req_rate' %}
|
||||
{% do stickiness_datatypes.append(datatype ~ '(' ~ proxy.stickiness_httpReqRatePeriod ~ ')') %}
|
||||
{% elif datatype == 'http_err_rate' %}
|
||||
{% do stickiness_datatypes.append(datatype ~ '(' ~ proxy.stickiness_httpErrRatePeriod ~ ')') %}
|
||||
{% elif datatype == 'bytes_in_rate' %}
|
||||
{% if datatype == 'bytes_in_rate' %}
|
||||
{% do stickiness_datatypes.append(datatype ~ '(' ~ proxy.stickiness_bytesInRatePeriod ~ ')') %}
|
||||
{% elif datatype == 'bytes_out_rate' %}
|
||||
{% do stickiness_datatypes.append(datatype ~ '(' ~ proxy.stickiness_bytesOutRatePeriod ~ ')') %}
|
||||
{% elif datatype == 'conn_rate' %}
|
||||
{% do stickiness_datatypes.append(datatype ~ '(' ~ proxy.stickiness_connRatePeriod ~ ')') %}
|
||||
{% elif datatype == 'glitch_rate' %}
|
||||
{% do stickiness_datatypes.append(datatype ~ '(' ~ proxy.stickiness_glitchRatePeriod ~ ')') %}
|
||||
{% elif datatype == 'gpc_rate' %}
|
||||
{% do stickiness_datatypes.append(datatype ~ '(' ~ proxy.stickiness_gpcElements ~ ',' ~ proxy.stickiness_gpcRatePeriod ~ ')') %}
|
||||
{% elif datatype == 'gpc0_rate' %}
|
||||
{% do stickiness_datatypes.append(datatype ~ '(' ~ proxy.stickiness_gpcRatePeriod ~ ')') %}
|
||||
{% elif datatype == 'gpc1_rate' %}
|
||||
{% do stickiness_datatypes.append(datatype ~ '(' ~ proxy.stickiness_gpcRatePeriod ~ ')') %}
|
||||
{% elif datatype == 'http_err_rate' %}
|
||||
{% do stickiness_datatypes.append(datatype ~ '(' ~ proxy.stickiness_httpErrRatePeriod ~ ')') %}
|
||||
{% elif datatype == 'http_fail_rate' %}
|
||||
{% do stickiness_datatypes.append(datatype ~ '(' ~ proxy.stickiness_httpFailRatePeriod ~ ')') %}
|
||||
{% elif datatype == 'http_req_rate' %}
|
||||
{% do stickiness_datatypes.append(datatype ~ '(' ~ proxy.stickiness_httpReqRatePeriod ~ ')') %}
|
||||
{% elif datatype == 'sess_rate' %}
|
||||
{% do stickiness_datatypes.append(datatype ~ '(' ~ proxy.stickiness_sessRatePeriod ~ ')') %}
|
||||
{% else %}
|
||||
{% do stickiness_datatypes.append(datatype) %}
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user