Repository: incubator-trafficcontrol
Updated Branches:
  refs/heads/master 0835dc7e0 -> 386b6f47d


Fixing setting up the Query String


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/5b9d359a
Tree: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/5b9d359a
Diff: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/5b9d359a

Branch: refs/heads/master
Commit: 5b9d359aaa5e45f91014ceaf9fcf1d82f3d1de4a
Parents: 815fc8a
Author: Steve Malenfant <steve.malenf...@cox.com>
Authored: Wed Feb 15 14:46:49 2017 -0500
Committer: David Neuman <david.neuma...@gmail.com>
Committed: Thu Feb 23 08:54:00 2017 -0700

----------------------------------------------------------------------
 traffic_stats/influxdb_tools/sync/sync_ts_databases.go | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/5b9d359a/traffic_stats/influxdb_tools/sync/sync_ts_databases.go
----------------------------------------------------------------------
diff --git a/traffic_stats/influxdb_tools/sync/sync_ts_databases.go 
b/traffic_stats/influxdb_tools/sync/sync_ts_databases.go
index 3e3692c..b38c103 100644
--- a/traffic_stats/influxdb_tools/sync/sync_ts_databases.go
+++ b/traffic_stats/influxdb_tools/sync/sync_ts_databases.go
@@ -184,7 +184,7 @@ func syncCacheStat(sourceClient influx.Client, targetClient 
influx.Client, statN
                RetentionPolicy: "monthly",
        })
 
-       queryString := fmt.Sprintf("select time, cdn, hostname, type, value 
from \"%s\".\"%s\"", rp, statName)
+       queryString := fmt.Sprintf("select time, cdn, hostname, type, value 
from \"%s\".\"%s\"", "monthly", statName)
 
        if days > 0 {
                queryString = fmt.Sprintf("%s where time > now() - %dd", 
queryString, days)
@@ -258,7 +258,7 @@ func syncDeliveryServiceStat(sourceClient influx.Client, 
targetClient influx.Cli
                RetentionPolicy: rp,
        })
 
-       queryString := fmt.Sprintf("select time, cachegroup, cdn, 
deliveryservice, value from \"monthly\".\"%s\"", statName)
+       queryString := fmt.Sprintf("select time, cachegroup, cdn, 
deliveryservice, value from \"%s\".\"%s\"", rp, statName)
        if days > 0 {
                queryString = fmt.Sprintf("%s where time > now() - %dd", 
queryString, days)
        }

Reply via email to