prometheus / prometheus/alertmanager

linebreaks in label values are not propperly displayed in emails

Open
#2,739 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

component/templating kind/support
Dominant language
Go
Stars
8.6k
Forks
2.5k
Avg merge
2d 6h
Merged PRs (30d)
61

Description

Some of my Label values contains line breaks.

If I send now a notification via email by using your default email template, line breaks are not properly displayed. If I check the raw email message I see that these line breaks are still there (as "\n") but they should be converted to "< / br > "

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating Alertmanager's default email template and the notification rendering path, then reproduce the issue with a label value containing line breaks and inspect the raw email. Done means those line breaks are rendered as HTML breaks in the default email notification rather than remaining as literal newline escapes.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
observability
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.