From 95d890314463fae26129e63fcdc54ddf9805fa34 Mon Sep 17 00:00:00 2001 From: Chris Goller Date: Wed, 5 Apr 2017 23:19:06 -0500 Subject: [PATCH] Add ID for each kapacitor rule --- kapacitor/client.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kapacitor/client.go b/kapacitor/client.go index 77609599ab..ec0d3c8b3d 100644 --- a/kapacitor/client.go +++ b/kapacitor/client.go @@ -179,6 +179,7 @@ func (c *Client) All(ctx context.Context) (map[string]chronograf.AlertRule, erro script := chronograf.TICKScript(task.TICKscript) if rule, err := Reverse(script); err != nil { alerts[task.ID] = chronograf.AlertRule{ + ID: task.ID, Name: task.ID, TICKScript: script, } @@ -207,6 +208,7 @@ func (c *Client) Get(ctx context.Context, id string) (chronograf.AlertRule, erro rule, err := Reverse(script) if err != nil { return chronograf.AlertRule{ + ID: task.ID, Name: task.ID, TICKScript: script, }, nil