From d553e868a128190f82c3bf6ae3d691f9659287ee Mon Sep 17 00:00:00 2001 From: Dennis Ordanov Date: Thu, 1 Feb 2018 17:13:27 -0800 Subject: [PATCH 1/3] Update sarama to support 10.2.1 too. --- core/internal/helpers/sarama.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/internal/helpers/sarama.go b/core/internal/helpers/sarama.go index 492d7b0a..5ee36724 100644 --- a/core/internal/helpers/sarama.go +++ b/core/internal/helpers/sarama.go @@ -38,7 +38,7 @@ func parseKafkaVersion(kafkaVersion string) sarama.KafkaVersion { return sarama.V0_10_0_1 case "0.10.1", "0.10.1.0": return sarama.V0_10_1_0 - case "", "0.10.2", "0.10.2.0": + case "", "0.10.2", "0.10.2.0", "0.10.2.1": return sarama.V0_10_2_0 case "0.11.0", "0.11.0.1", "0.11.0.2": return sarama.V0_11_0_0 From fa42a279fc7435814e6bbeb9a3bdb2d69e685e71 Mon Sep 17 00:00:00 2001 From: Dennis Ordanov Date: Tue, 20 Mar 2018 02:00:38 -0700 Subject: [PATCH 2/3] Make slack json templates readable. --- config/default-slack-delete.tmpl | 31 ++++++++++++++++++++++++++++++- config/default-slack-post.tmpl | 31 ++++++++++++++++++++++++++++++- 2 files changed, 60 insertions(+), 2 deletions(-) diff --git a/config/default-slack-delete.tmpl b/config/default-slack-delete.tmpl index cb05da25..df6d66bb 100644 --- a/config/default-slack-delete.tmpl +++ b/config/default-slack-delete.tmpl @@ -1 +1,30 @@ -{ "attachments": [{"color": "good","title": "A kafka consumer is has caught up his lag","fields": [{"title": "Group","value": "{{ .Group }}", "short": false},{"title": "Cluster","value": "{{ .Cluster }}","short": true},{"title": "Total Lag","value": "{{ .Result.TotalLag}}","short": true}, {"title": "Start","value": "{{ .Start.Format "2006-01-02T15:04:05Z07:00" }}","short": true}]}]} +{ + "attachments": [ + { + "fields": [ + { + "short": false, + "value": "{{ .Group }}", + "title": "Group" + }, + { + "short": true, + "value": "{{ .Cluster }}", + "title": "Cluster" + }, + { + "short": true, + "value": "{{ .Result.TotalLag}}", + "title": "Total Lag" + }, + { + "short": true, + "value": " {{ .Start.Format "2006-01-02T15:04:05Z07:00" }}", + "title": "Start" + } + ], + "title": "A kafka consumer is lagging behind!", + "color": "danger" + } + ] +} diff --git a/config/default-slack-post.tmpl b/config/default-slack-post.tmpl index ddffa338..e8adfc68 100644 --- a/config/default-slack-post.tmpl +++ b/config/default-slack-post.tmpl @@ -1 +1,30 @@ -{ "attachments": [{"color": "danger","title": "A kafka consumer is lagging behind!","fields": [{"title": "Group","value": "{{ .Group }}", "short": false},{"title": "Cluster","value": "{{ .Cluster }}","short": true},{"title": "Total Lag","value": "{{ .Result.TotalLag}}","short": true}, {"title": "Start","value": "{{ .Start.Format "2006-01-02T15:04:05Z07:00" }}","short": true}]}]} +{ + "attachments": [ + { + "fields": [ + { + "short": false, + "value": "{{ .Group }}", + "title": "Group" + }, + { + "short": true, + "value": "{{ .Cluster }}", + "title": "Cluster" + }, + { + "short": true, + "value": "{{ .Result.TotalLag}}", + "title": "Total Lag" + }, + { + "short": true, + "value": " {{ .Start.Format "2006-01-02T15:04:05Z07:00" }}", + "title": "Start" + } + ], + "title": "A kafka consumer is no longer lagging", + "color": "good" + } + ] +} From a2742e935e67c47186441cfe74f23d4c7340f8c3 Mon Sep 17 00:00:00 2001 From: Dennis Ordanov Date: Tue, 20 Mar 2018 02:12:56 -0700 Subject: [PATCH 3/3] undo accidental reversal of post/delete tmpls --- config/default-slack-delete.tmpl | 4 ++-- config/default-slack-post.tmpl | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/config/default-slack-delete.tmpl b/config/default-slack-delete.tmpl index df6d66bb..e8adfc68 100644 --- a/config/default-slack-delete.tmpl +++ b/config/default-slack-delete.tmpl @@ -23,8 +23,8 @@ "title": "Start" } ], - "title": "A kafka consumer is lagging behind!", - "color": "danger" + "title": "A kafka consumer is no longer lagging", + "color": "good" } ] } diff --git a/config/default-slack-post.tmpl b/config/default-slack-post.tmpl index e8adfc68..df6d66bb 100644 --- a/config/default-slack-post.tmpl +++ b/config/default-slack-post.tmpl @@ -23,8 +23,8 @@ "title": "Start" } ], - "title": "A kafka consumer is no longer lagging", - "color": "good" + "title": "A kafka consumer is lagging behind!", + "color": "danger" } ] }