Fix TM2 monitorconfig to correct conversion funcs
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/387cbed2 Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/387cbed2 Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/387cbed2 Branch: refs/heads/master Commit: 387cbed295ec5ce8385f4283f2af0a147409e3ed Parents: 690887a Author: Robert Butts <robert.o.bu...@gmail.com> Authored: Thu Nov 3 14:09:26 2016 -0600 Committer: Dave Neuman <neu...@apache.org> Committed: Mon Nov 7 12:29:08 2016 -0700 ---------------------------------------------------------------------- .../experimental/traffic_monitor/manager/monitorconfig.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/387cbed2/traffic_monitor/experimental/traffic_monitor/manager/monitorconfig.go ---------------------------------------------------------------------- diff --git a/traffic_monitor/experimental/traffic_monitor/manager/monitorconfig.go b/traffic_monitor/experimental/traffic_monitor/manager/monitorconfig.go index 2505b9b..5f239bd 100644 --- a/traffic_monitor/experimental/traffic_monitor/manager/monitorconfig.go +++ b/traffic_monitor/experimental/traffic_monitor/manager/monitorconfig.go @@ -138,7 +138,7 @@ func getHealthPeerStatPollIntervals(monitorConfig to.TrafficMonitorConfigMap, cf if !peerPollIntervalIsInt { return 0, 0, 0, fmt.Errorf("Traffic Ops Monitor config 'peers.polling.interval' value '%v' type %T is not an integer, not setting config changes.\n", peerPollIntervalI, peerPollIntervalI) } - peerPollInterval := trafficOpsHealthPollIntervalToDuration(int(peerPollIntervalInt)) + peerPollInterval := trafficOpsPeerPollIntervalToDuration(int(peerPollIntervalInt)) statPollIntervalI, statPollIntervalExists := monitorConfig.Config["stat.polling.interval"] if !statPollIntervalExists { @@ -150,7 +150,7 @@ func getHealthPeerStatPollIntervals(monitorConfig to.TrafficMonitorConfigMap, cf log.Warnf("Traffic Ops Monitor config 'stat.polling.interval' value '%v' type %T is not an integer, using health for stat\n", statPollIntervalI, statPollIntervalI) statPollIntervalI = healthPollIntervalI } - statPollInterval := trafficOpsHealthPollIntervalToDuration(int(statPollIntervalInt)) + statPollInterval := trafficOpsStatPollIntervalToDuration(int(statPollIntervalInt)) // Formerly, only 'health' polling existed. If TO still has old configuration and doesn't have a 'stat' parameter, this allows us to assume the 'health' poll is slow, and sets it to the stat poll (which used to be the only poll, getting all astats data) to the given presumed-slow health poll, and set the now-fast-and-small health poll to a short fraction of that. if healthPollIntervalExists && !statPollIntervalExists {