prometheus / prometheus/alertmanager
[JIRA_CONFIG] Template fields alert manager --> jira integration does not work
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 8.6k
- Forks
- 2.5k
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 61
Description
Hellow!
Tried to use a new feature that allows to integrate Alertmanager with Jira without using jiralert https://github.com/prometheus/alertmanager/blob/main/docs/configuration.md#jira_config.
Encountered a problem that the “template” in “fields” is not readable, this is what my configuration file block looks like:
fields:
customfield_10002: "AB-123"
customfield_11314: [ { "key": "ABCD-123" } ]
customfield_11315: [ { "key": "ABCD-123" } ]
customfield_13707: '{{ template "jira.test.alertname" . }}'
customfield_13708: '{{ template "jira.test.namespace" . }}'
customfield_13709: '{{ template "jira.test.instance" . }}'
As a result when trying to send a notification, the sending happens, but the values are not read out and we get template names in the notification text, for example :
'alertname = {{ template 'jira.test.alertname' . }}'
namespace = {{ template “jira.test.namespace” . }}
And I want to get:
alertname = prod-123 (example)
namespace = monitoring (example)
Can you tell me if Alertmanager can't handle template in fields correctly or is there another construct for this?
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 docs/configuration.md#jira_config and reproduce the reported fields configuration using the customfield values and template expressions shown in the issue. Trace how Jira notification fields are rendered and confirm that alertname, namespace, and instance values are substituted instead of being sent as literal template text.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100