Unable to create a ticket from alert manager to jira

Well i am able to create a ticket with https://{{{{ jira_url }}}}/rest/api/2/issue/ using postman and curl but unable to do it using alert manager in prometheus.

I am trying to configure alertmanager using the following provided text in the alert_manager.yml

global:
resolve_timeout: 5m
templates:

  • ‘/etc/alert_manager/templates/jira_custom_template.tmpl’
    route:
    group_by: [‘alertname’]
    group_wait: 10s
    group_interval: 10s
    repeat_interval: 4h
    receiver: ‘jira-webhook’
    routes:
  • match:
    severity: “critical”
    receiver: ‘jira-webhook’
    receivers:
  • name: ‘jira-webhook’
    webhook_configs:
  • url: ‘https://{{{{ jira_url }}}}/rest/api/2/issue/’
    http_config:
    basic_auth:
    username: ‘{{{{ jira_user_name }}}}’
    password: ‘{{{{ jira_api_token }}}}’
    send_resolved: true

inhibit_rules:

  • source_match:
    severity: ‘critical’
    target_match:
    severity: ‘warning’
    equal: [‘alertname’, ‘dev’, ‘instance’]
    For some reason, it says it can find jira_custom_template.tmpl and it’s complaining about project key not found. Could you please help me. Any help will be appreciated.

This is not going to work the way you are attempting to do it. They payload expected by the JIRA Create Issue API Endpoint is completely different from the one sent by the Alertmanager (see docs).

You can use something like JIRAlert: an intermediary service that is able to handle the alertmanager payload and translate into appropriate JIRA API calls

Thanks for replying. Yes, after going through the document, I realised what I was doing. To achieve what I want from it, I went and created my own service to do the job.