diff options
author | Michael Larson <mike@vyatta.com> | 2011-03-30 12:09:58 -0700 |
---|---|---|
committer | Michael Larson <mike@vyatta.com> | 2011-03-30 12:09:58 -0700 |
commit | 25eef8bfb91c2c57907ab79f4ba6bcd9fe0064cb (patch) | |
tree | 53f6756f29c645fcec455bfec6a1bf8bdb53e50d /templates/load-balancing | |
parent | 55cab2fbbf2ee75d6939a9210ddcaa5c72ed6981 (diff) | |
download | vyatta-wanloadbalance-25eef8bfb91c2c57907ab79f4ba6bcd9fe0064cb.tar.gz vyatta-wanloadbalance-25eef8bfb91c2c57907ab79f4ba6bcd9fe0064cb.zip |
check in for Bug 6959
Add the ability to run a user defined script to determine wan load-balancing interface health
includes sample http test (scripts/http_test.pl). Configuration will look as follows:
wan {
interface-health eth0 {
nexthop 10.3.0.1
test 1 {
test-script /tmp/http_test.pl
type user-defined
}
}
interface-health eth1 {
nexthop 10.3.0.1
test 1 {
test-script /tmp/http_test.pl
type user-defined
}
}
With corresponding output:
vyatta@vyatta# run show wan-load-balance
Interface: eth0
Status: active
Last Status Change: Wed Mar 30 19:03:59 2011
+Test: user Script: /tmp/http_test.pl
Last Interface Success: 0s
Last Interface Failure: n/a
# Interface Failure(s): 0
Interface: eth1
Status: failed
Last Status Change: Wed Mar 30 19:03:59 2011
-Test: user Script: /tmp/http_test.pl
Last Interface Success: n/a
Last Interface Failure: 0s
# Interface Failure(s): 52
Scripts returns 0 for success, non-zero for failure.
Diffstat (limited to 'templates/load-balancing')
-rw-r--r-- | templates/load-balancing/wan/interface-health/node.tag/test/node.tag/test-script/node.def | 3 | ||||
-rw-r--r-- | templates/load-balancing/wan/interface-health/node.tag/test/node.tag/type/node.def | 5 |
2 files changed, 6 insertions, 2 deletions
diff --git a/templates/load-balancing/wan/interface-health/node.tag/test/node.tag/test-script/node.def b/templates/load-balancing/wan/interface-health/node.tag/test/node.tag/test-script/node.def new file mode 100644 index 0000000..05e68cb --- /dev/null +++ b/templates/load-balancing/wan/interface-health/node.tag/test/node.tag/test-script/node.def @@ -0,0 +1,3 @@ +type: txt +help: Path to user defined script + diff --git a/templates/load-balancing/wan/interface-health/node.tag/test/node.tag/type/node.def b/templates/load-balancing/wan/interface-health/node.tag/test/node.tag/type/node.def index 95dc6ca..5775b6b 100644 --- a/templates/load-balancing/wan/interface-health/node.tag/test/node.tag/type/node.def +++ b/templates/load-balancing/wan/interface-health/node.tag/test/node.tag/type/node.def @@ -2,8 +2,9 @@ type: txt help: WLB test type -syntax:expression: $VAR(@) in "ping", "ttl"; - "action must be either ping or ttl expired test" +syntax:expression: $VAR(@) in "ping", "ttl", "user-defined"; + "action must be either ping, ttl expired or user defined test" val_help: ping; Test with icmp echo response val_help: ttl; Test with udp TTL expired response +val_help: user-defined; User defined test script |