apache / trafficcontrol

Apache Traffic Control is an Open Source implementation of a Content Delivery Network
https://trafficcontrol.apache.org/
Apache License 2.0
1.06k stars 344 forks source link

Add Traffic Monitor Loadavg Health Param time (1min,5min,15min) #1887

Open rob05c opened 6 years ago

rob05c commented 6 years ago

Currently, the param for loadavg is health.threshold.loadavg, hard-coded to be 1 minute.

We should change this to health.threshold.loadavg.1min, .5min, .15min, to allow configuring the loadavg threshold.

Correspondingly, thresholds are set by CacheStats. We should also change CacheStats (code: Result.Vitals.LoadAvg) to include 1min,5min,15min.

For backwards compatibility, CacheStats and parameters should still include loadavg which uses 1min.

rob05c commented 6 years ago

Code is currently in health/cache.go GetVitals https://github.com/apache/incubator-trafficcontrol/blob/0bef412fac339ccca672e525486bf3cc5b1dd2b6/traffic_monitor/health/cache.go#L47