From b0c57f950976a4356b2c01b0db26fcd448e7fc14 Mon Sep 17 00:00:00 2001 From: Chris Goller Date: Thu, 23 Mar 2017 13:15:39 -0700 Subject: [PATCH] Fix retention policy InfluxQL creation string --- influx/databases.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/influx/databases.go b/influx/databases.go index 0ca5d50ca..b188ed488 100644 --- a/influx/databases.go +++ b/influx/databases.go @@ -53,7 +53,7 @@ func (c *Client) AllRP(ctx context.Context, database string) ([]chronograf.Reten func (c *Client) CreateRP(ctx context.Context, database string, rp *chronograf.RetentionPolicy) (*chronograf.RetentionPolicy, error) { _, err := c.Query(ctx, chronograf.Query{ - Command: fmt.Sprintf(`CREATE RETENTION POLICY "%s" DURATION "%s" REPLICATION "%s"`, rp.Name, rp.Duration, rp.Replication), + Command: fmt.Sprintf(`CREATE RETENTION POLICY "%s" ON "%s" DURATION %s REPLICATION %d`, rp.Name, database, rp.Duration, rp.Replication), DB: database, }) if err != nil {