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/varnish.inc | |
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/varnish.inc')
-rw-r--r-- | config/varnish64/varnish.inc | 29 |
1 files changed, 29 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; |