Not able to attach custom headers to the notifier email
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 4k
- Forks
- 818
- Avg merge
- 1h 14m
- Merged PRs (30d)
- 1
Description
Hi, We are using this burrow template to trigger alert emails, but we are not able to attach custom headers to the email. We have tried the below option:
[Notifier email](https://github.com/linkedin/Burrow/wiki/Notifier-Email) : The link mentions that we can specify additional mail headers before the blank line before body part. We have followed the same but the lines that are supposed to be the headers are being shown as a part of body. The email template and config are as below:
### Template file:
Subject: Lag Alert: [prod][{{.Result.Cluster}}] for {{.Result.Group}}
X-ACCOUNT-ID: 1;
X-ORG-ID: 1;
X-EMAIL-TYPE: NOTIFICATION
X-ACCOUNT-TYPE: ACTIVE
X-SOURCE: MONITORING
The Kafka consumer groups you are monitoring are currently showing problems. The following groups are in a problem state (groups not listed are OK):
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}}
Complete: {{.Result.Complete}}
TotalLag: {{.Result.TotalLag}}
MaxLag: {{jsonencoder .Result.Maxlag}}
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}}
### Config:
class-name="email"
interval=300
threshold=2
group-allowlist="^example.*$"
send-close=true
server="example.com"
port=587
auth-type="plain"
username="example_username"
password="example_password"
enable=true
from="some_email_id"
to="some_email_id"
template-open="lag-alert-email.tmpl"
template-close="lag-ok-email.tmpl"
noverify=true
Please look at the issue on how to pass the custom headers to the notifier email using the burrow template.
Thanks.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Notifier-Email wiki page and the Burrow email template and configuration shown in the issue, then locate the notifier email parsing path. Reproduce the report with the supplied headers and inspect whether the blank line is recognized. Done means custom header lines are delivered as email headers rather than appearing in the message body.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100