Notifications

Notifications

Get alerted when issues occur, clusters disconnect, or runbooks fail.

Notification Channels

Optral supports multiple notification channels to keep your team informed.

Slack

Rich formatted messages with severity colors and action links

PagerDuty

Incidents with auto-resolve when issues are fixed

Webhooks

Custom HTTP endpoints with HMAC signatures

Email

HTML emails via Resend or SendGrid

Slack Integration

Setup

  1. Go to your Slack workspace and create a new app at api.slack.com/apps
  2. Enable Incoming Webhooks and create a webhook for your channel
  3. Copy the webhook URL (starts with https://hooks.slack.com/services/...)
  4. In Optral, go to Settings > Integrations
  5. Click Add Integration, select Slack, and paste the webhook URL

Example Slack message:

New Issue Detected
Type: OOMKilled
Severity: critical
Resource: default/api-server
Cluster: production

PagerDuty Integration

Setup

  1. In PagerDuty, go to Services and select or create a service
  2. Go to the Integrations tab and add a new integration
  3. Select Events API v2 as the integration type
  4. Copy the Integration Key (routing key)
  5. In Optral, go to Settings > Integrations
  6. Click Add Integration, select PagerDuty, and paste the routing key

Custom Webhooks

Setup

  1. Create an HTTPS endpoint that accepts POST requests
  2. In Optral, go to Settings > Integrations
  3. Click Add Integration, select Webhook
  4. Enter your endpoint URL and optionally a signing secret

Webhook payload format:

{
  "event": "issue.created",
  "timestamp": "2024-01-15T10:30:00Z",
  "data": {
    "type": "issue.created",
    "issue": {
      "id": "iss_abc123",
      "type": "OOMKilled",
      "severity": "critical",
      "resource": "api-server",
      "namespace": "default",
      "cluster": "production",
      "message": "Container exceeded memory limit",
      "detectedAt": "2024-01-15T10:30:00Z"
    },
    "orgId": "org_xyz"
  }
}

Signature verification (if secret configured):

// Header: X-Optral-Signature: sha256=<signature>
const crypto = require('crypto');

function verifySignature(body, signature, secret) {
  const expected = 'sha256=' + crypto
    .createHmac('sha256', secret)
    .update(body)
    .digest('hex');
  return crypto.timingSafeEqual(
    Buffer.from(signature),
    Buffer.from(expected)
  );
}

Email Notifications

Setup

Email notifications can be configured in two ways:

Option 1: Notification Settings

Go to Settings > Notifications and enable email notifications. Add recipient email addresses to receive alerts.

Option 2: Email Integration

Go to Settings > Integrations, add an Email integration, and configure specific recipients for that integration.

Notification Settings

Event Types

Choose which events trigger notifications

Issue Created

When new issues are detected

Default: On

Issue Resolved

When issues are marked as resolved

Default: On

Cluster Disconnected

When a cluster stops sending heartbeats

Default: On

Runbook Failed

When automated runbook execution fails

Default: On

Severity Filter

Only receive notifications for specific severity levels

By default, notifications are sent for critical and high severity issues. You can customize this in Settings > Notifications to include medium or low severity issues.