From dc4cb84547ea1df178a941fa13d4cabf41cb947a Mon Sep 17 00:00:00 2001 From: kanga333 Date: Thu, 3 May 2018 04:54:45 +0900 Subject: [PATCH] Fix mail template (#369) --- config/default-email.tmpl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config/default-email.tmpl b/config/default-email.tmpl index 17299c5a..9fec7ac9 100644 --- a/config/default-email.tmpl +++ b/config/default-email.tmpl @@ -4,8 +4,8 @@ The Kafka consumer groups you are monitoring are currently showing problems. The Cluster: {{.Result.Cluster}} Group: {{.Result.Group}} -Status: {{if eq 1 .Result.Status}}OK{{else if eq 1 .Result.Status}}WARNING{{else if eq 2 .Result.Status}}ERROR{{end}} +Status: {{.Result.Status.String}} Complete: {{.Result.Complete}} Errors: {{len .Result.Partitions}} partitions have problems -{{range .Result.Partitions}} {{if eq 1 .Status}} OK{{if eq 2 .Status}} WARN{{else if eq 2 .Status}} ERR{{else if eq 3 .Status}} STOP{{else if eq 4 .Status}}STALL{{end}} {{.Topic}}:{{.Partition}} ({{.Start.Timestamp}}, {{.Start.Offset}}, {{.Start.Lag}}) -> ({{.End.Timestamp}}, {{.End.Offset}}, {{.End.Lag}}) -{{end}}{{end}} +{{range .Result.Partitions}} {{.Status.String}} {{.Topic}}:{{.Partition}} ({{.Start.Timestamp}}, {{.Start.Offset}}, {{.Start.Lag}}) -> ({{.End.Timestamp}}, {{.End.Offset}}, {{.End.Lag}}) +{{end}}