|
| 1 | +{"msgtype": "markdown","markdown": {"content": " |
| 2 | +{{- $StatusURL := "https://pkg.go.dev/github.com/linkedin/Burrow/core/protocol#StatusConstant"}} |
| 3 | +{{- $FormatString := "2006-01-02 15:04:05"}} |
| 4 | +# Kafka: {{.Cluster}} |
| 5 | +ConsumerGroup: {{.Group}}{{- with .Result.Status}} |
| 6 | +{{- if eq . 0}}NotFound{{end}} |
| 7 | +{{- if eq . 1}}<font color=\"info\">normal</font>{{end}} |
| 8 | +{{- if eq . 2}}<font color=\"warning\">lagging</font>{{end}} |
| 9 | +{{- if eq . 3}}<font color=\"comment\">abnormal</font>{{end}} |
| 10 | +{{- end}} |
| 11 | +**Status:** Total(Partitions={{.Result.TotalPartitions}},Lag={{.Result.TotalLag}})[{{- with .Result.Status}} |
| 12 | +{{- if eq . 0}}NotFound{{end}} |
| 13 | +{{- if eq . 1}}<font color=\"info\">{{.}}</font>{{end}} |
| 14 | +{{- if eq . 2}}<font color=\"warning\">{{.}}</font>{{end}} |
| 15 | +{{- if eq . 3}}<font color=\"comment\">{{.}}</font>{{end}} |
| 16 | +{{- end}}]({{$StatusURL}}){{printf "%.2f" .Result.Complete}} |
| 17 | +{{- if .Result.Maxlag|maxlag}} |
| 18 | +**MaxLagDetails:** |
| 19 | +{{- with .Result.Maxlag}} |
| 20 | +{{.Topic}}[{{.Status.String}}](){{printf "%.2f" .Complete}} |
| 21 | +{{- if .Owner}}\n\tConsumerHost={{.Owner}}{{end}} |
| 22 | +{{- if .ClientID}}\n\tConsumerClientID={{.ClientID}}{{end}} |
| 23 | +\tCurrentLag={{.CurrentLag}} |
| 24 | +\tPartition={{.Partition}} |
| 25 | +{{- end}} |
| 26 | +{{- end}} |
| 27 | +{{- $TotalErrors := len .Result.Partitions}} |
| 28 | +{{- if $TotalErrors}} |
| 29 | +### <font color=\"comment\">{{$TotalErrors}} partitions have problems</font> |
| 30 | +>**CountPartitions:** |
| 31 | +{{- range $k,$v := .Result.Partitions|partitioncounts}} |
| 32 | +{{- if ne $v 0}}\n\t{{$k}}={{$v}}{{end}} |
| 33 | +{{- end}} |
| 34 | +**TopicsByStatus:** |
| 35 | +{{- range $k,$v := .Result.Partitions|topicsbystatus}} |
| 36 | +\t{{$k}}={{$v}} |
| 37 | +{{- end}} |
| 38 | +**PartitionDetails:** |
| 39 | +{{- range .Result.Partitions}} |
| 40 | +{{.Topic}}[{{.Status.String}}](){{printf "%.2f" .Complete}} |
| 41 | +{{- if .Owner}}\n\tConsumerHost={{.Owner}}{{end}} |
| 42 | +{{- if .ClientID}}\n\tConsumerClientID={{.ClientID}}{{end}} |
| 43 | +\tCurrentLag={{.CurrentLag}} |
| 44 | +\tPartition={{.Partition}} |
| 45 | +\tStart={{formattimestamp .Start.Timestamp $FormatString}} |
| 46 | +\t\tOffset={{.Start.Offset}}\tLag={{.Start.Lag.Value}} |
| 47 | +\tEnd={{formattimestamp .End.Timestamp $FormatString}} |
| 48 | +\t\tOffset={{.End.Offset}}\tLag={{.End.Lag.Value}} |
| 49 | +{{- end}} |
| 50 | +{{- end}} |
| 51 | +" |
| 52 | +}} |
0 commit comments