Skip to content

Pagerduty alert mapping only works via test

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Summary

Monitoring -> Alerts does not show mapped pagerduty fields unless using a test payload.

Steps to reproduce

  1. In GitLab
    1. Create a new Integration under Monitor Settings
    2. Save the Webhook URL and the Authorization Key
  2. In Pagerduty
    1. Navigate to Integrations, Generic Webhooks (V3)
    2. + New Webhook
    3. Add the Webhook URL, select scope and service
    4. Add custom header
      1. Name: Authorization
      2. Value: Bearer $GITLAB_AUTHORIZATION_KEY
      3. Save Changes
    5. At the bottom, Send Test Event
  3. In GitLab
    1. Navigate to Monitor, Alerts in the left sidepanel
    2. Select the test alert and scroll to Details
    3. Copy the JSON
    4. Navigate to Settings, Monitor, Alerts
    5. Edit the Integration
    6. Customize alert payload mapping
      1. Paste the test alert details
      2. Map fields such as:
        1. Title (String) to Event.data.title
        2. Save
        3. Send Test Alert
          1. Once again paste the sample alert details, and send
    7. Navigate to Monitor, Alerts in the left side panel, note that Title is mapped
  4. In Pagerduty
    1. Create an incident with a unique title
  5. In GitLab
    1. Check alerts, note that the title #New: Alert instead of the created title

What is the current bug behavior?

Mapped fields only work in test alerts

What is the expected correct behavior?

Mapped fields should also work in real pagerduty alerts

Relevant logs and/or screenshots

Both alerts, #32 was created from Pagerduty, #33 was the payload copied from Details of alert #33 and pasted into a test alert. The title populates correctly in the test alert (#33) but not in the real alert

image.png

Test Alert

We get the title and description (mapped to URL for testing)

image.png

Real Alert

Fields are empty, title is the default:

image.png

Output of checks

Reproducible on gitlab.com https://gitlab.com/edwardhilgendorf_ultimate_group/tickets/603586/-/alert_management (private/internal)

Possible fixes

Edited by 🤖 GitLab Bot 🤖