mirror of
https://github.com/nadoo/glider.git
synced 2026-11-19 07:09:42 +08:00
check: set checklatencysamples default to 10 (#282)
This commit is contained in:
1 parent
fa97a44e8d
commit
f96ad73c7d
5 files changed
+16
-11
No files matched your search
+1
-1
@@ -47,7 +47,7 @@ func NewConfFromFile(ruleFile string) (*Config, error) {
|
||||
f.StringVar(&p.Strategy.Check, "check", "http://www.msftconnecttest.com/connecttest.txt#expect=200", "check=tcp[://HOST:PORT]: tcp port connect check\ncheck=http://HOST[:PORT][/URI][#expect=STRING_IN_RESP_LINE]\ncheck=file://SCRIPT_PATH: run a check script, healthy when exitcode=0, environment variables: FORWARDER_ADDR\ncheck=disable: disable health check")
|
||||
f.IntVar(&p.Strategy.CheckInterval, "checkinterval", 30, "fowarder check interval(seconds)")
|
||||
f.IntVar(&p.Strategy.CheckTimeout, "checktimeout", 10, "fowarder check timeout(seconds)")
|
||||
f.IntVar(&p.Strategy.CheckLatencySamples, "checklatencysamples", 1, "use the average latency of the latest N checks")
|
||||
f.IntVar(&p.Strategy.CheckLatencySamples, "checklatencysamples", 10, "use the average latency of the latest N checks")
|
||||
f.IntVar(&p.Strategy.CheckTolerance, "checktolerance", 0, "fowarder check tolerance(ms), switch only when new_latency < old_latency - tolerance, only used in lha mode")
|
||||
f.BoolVar(&p.Strategy.CheckDisabledOnly, "checkdisabledonly", false, "check disabled fowarders only")
|
||||
f.IntVar(&p.Strategy.MaxFailures, "maxfailures", 3, "max failures to change forwarder status to disabled")
|
||||
|
||||
Reference in new issue
Block a user