Skip to main content

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

  1. In the OpsWorker portal, go to Integrations
  2. Select your cluster
  3. 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:

FieldSource
Alert namealertname label
Severityseverity label
Namespacenamespace label
Podpod label
Descriptiondescription annotation
Summarysummary annotation
All labelsPreserved for filtering

Routing Tips

  • Use continue: true to 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_by settings

Next Steps