Overview

Migrating from Opsgenie to Sizemotion? Our Opsgenie-compatible endpoint allows you to switch incident management platforms without reconfiguring your monitoring tools. Send the same alert payloads you use today—just change the endpoint URL and authentication token.

Key Benefits:
  • Drop-in replacement for Opsgenie Create Alert API
  • Same payload format - no code changes required
  • Automatic priority mapping (P1-P5 → Sev 1-4)
  • Preserve all Opsgenie metadata
  • Compatible with existing monitoring integrations
  • Idempotency using alias field

Migration Guide

Switching from Opsgenie requires only two changes to your existing configuration:

❌ Before (Opsgenie)

POST https://api.opsgenie.com/v2/alerts
Authorization: GenieKey abc123...

✅ After (Sizemotion)

POST https://sizemotion.com/api/v1/incidents/webhook/opsgenie/5
Authorization: Bearer xyz789...
✅ Zero Payload Changes: Your existing alert payload stays exactly the same. All Opsgenie fields (message, alias, priority, responders, tags, details) work identically.

Setup Steps

Step 1: Get Your Webhook URL

Each team has a unique Opsgenie-compatible webhook URL:

  1. Navigate to Team Settings in your workspace
  2. Locate the Team Information section
  3. Note your Team ID (e.g., 5)
  4. Your webhook URL format:
    https://sizemotion.com/api/v1/incidents/webhook/opsgenie/{TEAM_ID}
Multiple Teams? Route different alerts to different teams by using the appropriate Team ID in the webhook URL.

Step 2: Create API Token

  1. Go to Admin Settings → API Tokens
  2. Click Create New Token
  3. Name it descriptively (e.g., "Opsgenie Migration - Datadog")
  4. Save the token securely - it won't be shown again!

Step 3: Update Your Monitoring Tools

Update your existing alert configurations with the new endpoint:

Datadog Webhook

  1. Go to Integrations → Webhooks
  2. Edit your existing Opsgenie webhook
  3. Update URL to: https://sizemotion.com/api/v1/incidents/webhook/opsgenie/5
  4. Update custom header: Authorization: Bearer YOUR_API_TOKEN
  5. Keep your existing payload format

Prometheus AlertManager

Update your alertmanager.yml:

receivers:
  - name: 'sizemotion-opsgenie'
    webhook_configs:
      - url: 'https://sizemotion.com/api/v1/incidents/webhook/opsgenie/5'
        http_config:
          authorization:
            credentials: 'YOUR_API_TOKEN'
        send_resolved: false

Custom Scripts

Update your monitoring scripts with new values:

OPSGENIE_ENDPOINT="https://sizemotion.com/api/v1/incidents/webhook/opsgenie/5"
OPSGENIE_API_KEY="Bearer YOUR_API_TOKEN"
💡 Pro Tip: Test your migration with a single alert source first before updating all monitoring tools. This allows you to verify the integration without disrupting your entire incident workflow.

Step 4: Test the Integration

Verify your setup:

  1. Send a test alert from your monitoring tool
  2. Check your Sizemotion workspace for the test incident
  3. Verify all metadata is preserved (tags, details, priority)
  4. Confirm severity mapping is correct

Field Mapping

Opsgenie to Sizemotion

All Opsgenie fields are preserved and mapped to Sizemotion:

Opsgenie Field Sizemotion Field Notes
message title Required - incident title
alias external_id For idempotency
description description Full alert context
priority severity P1→Sev 1, P2→Sev 2, etc.
tags tags Enriched with priority/source
details metadata.details All key-value pairs
responders metadata.responders Preserved for reference
entity metadata.entity Added to tags as entity:{value}

Priority Mapping

Opsgenie priority values automatically map to Sizemotion severities:

Opsgenie Priority Sizemotion Severity Description
P1 Sev 1 Critical - immediate action required
P2 Sev 2 High - significant impact
P3 Sev 3 Medium - moderate impact
P4 Sev 4 Low - minimal impact
P5 Sev 4 Informational (mapped to lowest)

Examples

Python Script

Before (Opsgenie):

import requests

response = requests.post(
    'https://api.opsgenie.com/v2/alerts',
    headers={'Authorization': 'GenieKey abc123...'},
    json={
        'message': 'High CPU on prod-web-01',
        'alias': 'cpu_alert_123',
        'priority': 'P2',
        'tags': ['production', 'web-server']
    }
)

After (Sizemotion):

import requests

response = requests.post(
    'https://sizemotion.com/api/v1/incidents/webhook/opsgenie/5',
    headers={'Authorization': 'Bearer xyz789...'},
    json={
        'message': 'High CPU on prod-web-01',
        'alias': 'cpu_alert_123',
        'priority': 'P2',
        'tags': ['production', 'web-server']
    }
)

cURL

Before (Opsgenie):

curl -X POST https://api.opsgenie.com/v2/alerts \
  -H "Authorization: GenieKey abc123..." \
  -H "Content-Type: application/json" \
  -d '{
    "message": "Database connection timeout",
    "alias": "db_timeout_456",
    "description": "Unable to connect to primary database",
    "priority": "P1",
    "tags": ["database", "production"],
    "details": {
      "host": "db-prod-01",
      "duration": "30s"
    }
  }'

After (Sizemotion):

curl -X POST https://sizemotion.com/api/v1/incidents/webhook/opsgenie/5 \
  -H "Authorization: Bearer xyz789..." \
  -H "Content-Type: application/json" \
  -d '{
    "message": "Database connection timeout",
    "alias": "db_timeout_456",
    "description": "Unable to connect to primary database",
    "priority": "P1",
    "tags": ["database", "production"],
    "details": {
      "host": "db-prod-01",
      "duration": "30s"
    }
  }'

Full Payload Example

All Opsgenie fields supported:

{
  "message": "High memory usage detected",
  "alias": "memory_alert_789",
  "description": "Memory usage exceeded 85% on production server",
  "priority": "P3",
  "tags": ["production", "memory", "infrastructure"],
  "entity": "prod-web-02",
  "source": "prometheus",
  "user": "monitoring-system",
  "note": "Triggered from Prometheus alert",
  "responders": [
    {"type": "team", "name": "backend"},
    {"type": "user", "username": "[email protected]"}
  ],
  "visibleTo": [
    {"type": "team", "name": "operations"}
  ],
  "actions": ["restart", "scale"],
  "details": {
    "region": "us-east-1",
    "instance": "i-1234567890abcdef0",
    "memory_percent": "87.5",
    "alert_url": "https://prometheus.example.com/alerts/789"
  }
}

Troubleshooting

Webhook Not Creating Incidents

Check these common issues:

  • Authorization Header: Must use "Bearer " prefix (not "GenieKey")
  • Team ID: Ensure the team ID in the URL is correct
  • API Token Permissions: Token must have incidents:create permission
  • URL Format: Should be /api/v1/incidents/webhook/opsgenie/{team_id}
  • Content-Type: Must be application/json

Duplicate Incidents

Duplicate prevention is automatic using the alias field:

  • Same alias creates only one incident
  • Different aliases create separate incidents
  • If alias is omitted, a new incident is created each time

Priority Not Mapping Correctly

Verify priority format:

  • Must be one of: P1, P2, P3, P4, P5
  • Case-insensitive: p1, P1 both work
  • Default is P3 (Sev 3) if omitted

Missing Alert Data

If incident details are incomplete:

  • Verify message field is present (required)
  • Check that JSON is properly formatted
  • Review the incident metadata - all Opsgenie fields are preserved

Testing Your Webhook

To validate the integration:

  1. Send a test alert using cURL (see examples above)
  2. Check your Sizemotion workspace for the test incident
  3. Verify all metadata is captured correctly
  4. Confirm tags include enrichment (priority_p1, source_opsgenie, etc.)

Getting Help

If issues persist:

  • Check Admin Settings → API Tokens for recent activity
  • Review webhook logs in your monitoring tool
  • See API Documentation for technical details
  • Contact your workspace administrator
✅ Migration Complete! Your alerts will now create Sizemotion incidents with zero code changes. All monitoring tools continue working as before, just routing to Sizemotion instead of Opsgenie.

What's Supported

  • ✅ Create Alert API (POST /v2/alerts) - fully compatible
  • ✅ All alert fields (message, alias, priority, tags, details, etc.)
  • ✅ Priority mapping (P1-P5)
  • ✅ Idempotency via alias
  • ✅ Auto-assignment to on-call responders
  • ✅ Opsgenie-compatible response format

Next Steps