diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2010-04-27 13:38:16 -0400 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2010-04-27 13:38:16 -0400 |
commit | d7d3c307cb263ad79158cba43c1e0e429b54217c (patch) | |
tree | c320138ca38a5d61a38d6e5559353a40f1d902c5 /config/varnish64 | |
parent | 22feb8dcc84bf2dcc451b231c29c3f8494b9eb43 (diff) | |
download | pfsense-packages-d7d3c307cb263ad79158cba43c1e0e429b54217c.tar.gz pfsense-packages-d7d3c307cb263ad79158cba43c1e0e429b54217c.tar.bz2 pfsense-packages-d7d3c307cb263ad79158cba43c1e0e429b54217c.zip |
Add backend probe settings
Diffstat (limited to 'config/varnish64')
-rw-r--r-- | config/varnish64/varnish.inc | 29 | ||||
-rw-r--r-- | config/varnish64/varnish_backends.xml | 30 |
2 files changed, 59 insertions, 0 deletions
diff --git a/config/varnish64/varnish.inc b/config/varnish64/varnish.inc index 1ec000e7..d21245d8 100644 --- a/config/varnish64/varnish.inc +++ b/config/varnish64/varnish.inc @@ -152,12 +152,41 @@ EOAU; $first_byte_timeout = $backend['first_byte_timeout'] . "s"; else $first_byte_timeout = "300s"; + + if($backend['probe_url']) + $probe_url = $backend['probe_url']; + else + $probe_url = "/"; + if($backend['probe_interval']) + $probe_interval = $backend['probe_interval'] . "s"; + else + $probe_interval = "1s"; + if($backend['probe_timeout']) + $probe_timeout = $backend['probe_timeout'] . "s"; + else + $probe_timeout = "1s"; + if($backend['probe_window']) + $probe_window = $backend['probe_window']; + else + $probe_window = "5"; + if($backend['probe_threshold']) + $probe_threshold = $backend['probe_threshold']; + else + $probe_threshold = "5"; + $backends .= <<<EOFA backend {$backend['backendname']} { .host = "{$backend['ipaddress']}"; .port = "{$backend['port']}"; .first_byte_timeout = {$first_byte_timeout}; .connect_timeout = {$connect_timeout}; + .probe = { + .url = "{$backend['probe_url']}"; + .interval = {$backend['probe_interval']}; + .timeout = {$backend['probe_timeout']}; + .window = {$backend['probe_window']}; + .threshold = {$backend['probe_threshold']}; + } } EOFA; diff --git a/config/varnish64/varnish_backends.xml b/config/varnish64/varnish_backends.xml index 45a955d9..6a46287b 100644 --- a/config/varnish64/varnish_backends.xml +++ b/config/varnish64/varnish_backends.xml @@ -130,6 +130,36 @@ <type>input</type> </field> <field> + <fielddescr>Probe URL</fielddescr> + <fieldname>probe_url</fieldname> + <description>Enter the URL that varnish will use to ensure that this backend is healthy.</description> + <type>input</type> + </field> + <field> + <fielddescr>Probe Interval</fielddescr> + <fieldname>probe_interval</fieldname> + <description>Enter the frequency in seconds that varnish will check the probe url.</description> + <type>input</type> + </field> + <field> + <fielddescr>Probe Timeout</fielddescr> + <fieldname>probe_timeout</fieldname> + <description>Enter the frequency in seconds that varnish will wait for a backend probe response.</description> + <type>input</type> + </field> + <field> + <fielddescr>Probe Window</fielddescr> + <fieldname>probe_window</fieldname> + <description>Enter the value of how many of the latest polls that should be examined.</description> + <type>input</type> + </field> + <field> + <fielddescr>Probe Threshold</fielddescr> + <fieldname>probe_threshold</fieldname> + <description>Enter the value of how many of those must have succeeded for us to consider the backend healthy.</description> + <type>input</type> + </field> + <field> <fielddescr>none</fielddescr> <fieldname>none</fieldname> <type>rowhelper</type> |