Prometheus AlertManager Integration
Overview
Configure Prometheus AlertManager to send alerts to OpsWorker for automatic investigation.
Prerequisites
- Prometheus AlertManager running in your cluster or externally
- OpsWorker cluster set up with the Kubernetes Agent installed
- Your OpsWorker webhook URL (available in the portal under Integrations → Alert Manager)
Setup
1. Get Your Webhook URL
- In the OpsWorker portal, go to Integrations
- Select your cluster
- Find Alert Manager and copy the webhook URL
The URL format is: https://alerts.opsworker.ai/webhook/YOUR_CLUSTER_TOKEN
2. Configure AlertManager
Add OpsWorker as a webhook receiver in your alertmanager.yml:
receivers:
- name: opsworker
webhook_configs:
- url: 'https://alerts.opsworker.ai/webhook/YOUR_CLUSTER_TOKEN'
send_resolved: true
route:
receiver: default
routes:
- receiver: opsworker
match:
severity: critical
continue: true # Also send to other receivers
3. Apply Configuration
If using Prometheus Operator (kube-prometheus-stack):
# AlertmanagerConfig resource
apiVersion: monitoring.coreos.com/v1alpha1
kind: AlertmanagerConfig
metadata:
name: opsworker
namespace: monitoring
spec:
receivers:
- name: opsworker
webhookConfigs:
- url: 'https://alerts.opsworker.ai/webhook/YOUR_CLUSTER_TOKEN'
sendResolved: true
route:
receiver: opsworker
matchers:
- name: severity
value: critical
For standalone AlertManager, reload the configuration:
# Send SIGHUP to AlertManager
kubectl exec -n monitoring alertmanager-0 -- kill -HUP 1
4. Verify
Trigger a test alert or wait for a real one. Check the OpsWorker portal under Alerts to verify signals are arriving.
Supported Fields
OpsWorker automatically extracts from Prometheus alerts:
| Field | Source |
|---|---|
| Alert name | alertname label |
| Severity | severity label |
| Namespace | namespace label |
| Pod | pod label |
| Description | description annotation |
| Summary | summary annotation |
| All labels | Preserved for filtering |
Routing Tips
- Use
continue: trueto send alerts to both OpsWorker and your existing receivers (PagerDuty, Slack, etc.) - Route specific severity levels or namespaces to OpsWorker using AlertManager's routing tree
- OpsWorker handles alert grouping independently — you don't need to adjust AlertManager's
group_bysettings
Next Steps
- Configure Alert Rules — Set up rules for which alerts trigger investigations
- Verify Cluster — Confirm end-to-end connectivity