Skip to content

[JIRA_CONFIG] Template fields alert manager --> jira integration does not work #4110

@vmkullo

Description

@vmkullo

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?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    To triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions