OpsGenie Integration Guide
Send alerts through webhooks.
Configure Opsgenie to send webhook notifications to Harness AI SRE when alerts are created, updated, or closed.
Before you begin
Harness webhook endpoint: Create an Opsgenie webhook in Harness AI SRE using the Opsgenie webhook template.
Opsgenie access: Admin permissions or integration management permissions.
Webhook URL: Copy the webhook URL from your Harness webhook configuration.
Outgoing webhook documentation: Go to Outgoing Webhook Integration for setup guidance.
Alert API reference: Go to Alert API to understand alert field definitions and structure.
Create webhook integration
Navigate to integrations
Open the integrations configuration in Opsgenie:
In Opsgenie, go to Settings, then select Integrations
Click Add integration
Search for Webhook or select Outgoing Webhook
Configure webhook integration
Name:
Harness AI SREIntegration type: Outgoing Webhook
Webhook URL: Your Harness webhook URL
https://<your-harness-instance>/gateway/ai-sre/api/webhooks/<webhook-id>Enabled: Check to activate
Add alert actions: Select actions to trigger webhook
Create
Update Priority
Acknowledge
Close
Add Note
Name:
Harness AI SREWebhook URL: Your Harness webhook URL
Custom Headers: Add authentication header
Header:
AuthorizationValue:
Bearer your-webhook-secret
Or:
Header:
X-Webhook-SecretValue:
your-secret-key
Add alert actions: Select trigger actions
Enabled: Check to activate
Name:
Harness AI SRE CriticalWebhook URL: Your Harness webhook URL
Add alert filter: Filter which alerts trigger webhook
Priority:
P1,P2Tags:
production,criticalTeams: Specific teams only
Add alert actions: Select actions
Enabled: Check to activate
Select alert actions
Choose which alert actions trigger the webhook:
☑ Create: Alert is created
☑ Acknowledge: Alert is acknowledged
☑ Close: Alert is closed
☐ Add Note: Note added to alert (optional)
☐ Update Priority: Priority changed (optional)
☐ Assign Ownership: Owner assigned (optional)
☐ Add Team: Team added (optional)
☐ Add Responder: Responder added (optional)
☐ Escalate: Alert escalated (optional)
☐ Delete: Alert deleted (optional)
Save integration
Click Save Integration to create the webhook.
Configure field mapping in Harness
In your Harness webhook configuration, map Opsgenie payload fields to alert properties.
Opsgenie webhook payload structure
Map basic fields
Use Mustache templates:
Advanced field mapping with CEL
Test the integration
Create test alert in Opsgenie
Create an alert to confirm delivery:
Go to Alerts in Opsgenie
Click Create Alert
Fill in alert details:
Message:
Test alert for Harness integrationPriority:
P3Tags:
test,harness
Click Create
Verify webhook triggered
Confirm Opsgenie delivered the webhook:
Go to Settings, then select Integrations
Click the Harness AI SRE integration
Check the Activity or Logs tab for webhook delivery
Verify in Harness
Confirm the alert arrived and mapped correctly:
Navigate to Alerts in Harness AI SRE
Check that the test alert appears
Verify field mapping is correct
Available Opsgenie fields
action
Alert action
Create, Acknowledge, Close, AddNote
alert.alertId
Unique alert identifier
alert-123-abc
alert.tinyId
Short numeric ID
123
alert.message
Alert message
High CPU usage on prod-server-01
alert.status
Alert status
open, closed
alert.priority
Alert priority
P1, P2, P3, P4, P5
alert.tags
Alert tags array
["production", "cpu"]
alert.alias
Alert alias
cpu-high-prod-server-01
alert.entity
Related entity
prod-server-01
alert.owner
Alert owner
ops-team
alert.description
Alert description
Long text description
alert.details
Custom key-value pairs
{"host": "prod-01", "metric": "cpu"}
alert.createdAt
Creation timestamp (ms)
1625097600000
alert.updatedAt
Last update timestamp (ms)
1625097700000
alert.teams
Assigned teams
[{id, name}]
alert.responders
Alert responders
[{id, type, name}]
alert.report.ackTime
Time to acknowledge (ms)
30000
alert.report.closeTime
Time to close (ms)
300000
alert.report.acknowledgedBy
User who acknowledged
john.doe
alert.report.closedBy
User who closed
jane.smith
Advanced configuration
Route by priority
Create separate Harness webhooks for different priorities:
P1/P2 (Critical):
Opsgenie integration:
Harness CriticalAlert filter: Priority is
P1orP2Webhook URL:
https://harness/webhooks/critical-webhook-id
P3/P4 (Medium):
Opsgenie integration:
Harness StandardAlert filter: Priority is
P3orP4Webhook URL:
https://harness/webhooks/standard-webhook-id
Route by team
Filter alerts by assigned team:
Opsgenie integration:
Alert filter: Team is
OperationsorPlatformWebhook URL: Your Harness webhook
Harness CEL:
Extract custom details
Access custom fields from alert.details:
Track alert lifecycle
Monitor alert lifecycle metrics:
Troubleshooting
Example: complete integration
Opsgenie webhook integration
Configure the integration with these settings:
Name: Harness AI SRE
Type: Outgoing Webhook
URL:
https://app.harness.io/gateway/ai-sre/api/webhooks/wh_abc123Alert Filter:
Priority:
P1,P2Tags:
production
Alert Actions:
Create
Acknowledge
Close
Enabled: ✓
Map fields in the Harness webhook
Next steps
Route alerts: Route and deduplicate Opsgenie alerts.
Use CEL in webhooks: Add advanced filtering logic.
AI agent: Enable automated alert investigation.
Opsgenie template: Use the pre-configured template.
Related documentation
Opsgenie official documentation
Outgoing webhook integration: Complete guide to webhook integration setup and configuration options.
Alert API: Alert field definitions (
alertId,tinyId,priority,tags,details).Edge Connector alert actions: Webhook payload structure and available fields.
Integration actions: Available alert actions (Create, Acknowledge, Close, AddNote, and others).
Last updated
Was this helpful?