Repository: incubator-trafficcontrol Updated Branches: refs/heads/master a49205094 -> 7fdcacff6
Fix TM2 DsStats IsHealthy to match IsAvailable Fixes Traffic Monitor 2.0 `/publish/DsStats` endpoint `isHealthy` stat to match TM1 and be true iff `isAvailable` is true. The isHealthy stat was supposed to represent whether the delivery service is healthy, as defined by the maximum kbps (and other data?) defined in Traffic Ops. It may or may not need fixed to reflect this in the future. Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/59c9960f Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/59c9960f Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/59c9960f Branch: refs/heads/master Commit: 59c9960fb08292bc68c55e81625091b2b6f285c8 Parents: 9066eef Author: Robert Butts <robert.o.bu...@gmail.com> Authored: Wed Oct 26 15:57:58 2016 -0600 Committer: Dave Neuman <neu...@apache.org> Committed: Fri Oct 28 14:00:36 2016 -0600 ---------------------------------------------------------------------- .../experimental/traffic_monitor/deliveryservice/stat.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/59c9960f/traffic_monitor/experimental/traffic_monitor/deliveryservice/stat.go ---------------------------------------------------------------------- diff --git a/traffic_monitor/experimental/traffic_monitor/deliveryservice/stat.go b/traffic_monitor/experimental/traffic_monitor/deliveryservice/stat.go index 5415634..090480f 100644 --- a/traffic_monitor/experimental/traffic_monitor/deliveryservice/stat.go +++ b/traffic_monitor/experimental/traffic_monitor/deliveryservice/stat.go @@ -84,8 +84,9 @@ func addAvailableData(dsStats Stats, crStates peer.Crstates, serverCachegroups m } if available.IsAvailable { - // c.IsAvailable.Value stat.CommonStats.IsAvailable.Value = true + // TODO fix to be whether the Delivery Service has exceeded max kbps defined in Traffic Ops in `/health/cdn-name`? + stat.CommonStats.IsHealthy.Value = true stat.CommonStats.CachesAvailableNum.Value++ cacheGroupStats := stat.CacheGroups[cacheGroup] cacheGroupStats.IsAvailable.Value = true