Alerts & Monitoring

Configure alert rules to monitor your infrastructure and applications. Get notified instantly when metrics cross thresholds or critical events occur, via email, webhooks, Slack, or Discord.

Metric-Based Alerts

Metric-based alerts monitor numeric values collected from your nodes and containers. When a metric crosses the configured threshold, an alert is triggered.

CPU Usage

Percentage of CPU utilisation across cores

Unit: %

Memory Usage

Percentage of RAM consumed by the system or container

Unit: %

Disk Usage

Percentage of disk space used on a volume or mount

Unit: %

System Load

1-minute, 5-minute, or 15-minute load average

Unit: load

Container Count

Number of running containers on a node

Unit: count

Create a CPU usage alert rule via API

bash
curl -X POST https://system.rouic.com/api/v1/alerts/rules \
  -H "Authorization: Bearer rk_YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "High CPU Usage",
    "type": "metric",
    "metric": "cpu_usage",
    "operator": ">",
    "threshold": 90,
    "severity": "warning",
    "cooldown": 300,
    "channels": ["email", "slack"]
  }'

Event-Based Alerts

Event-based alerts fire when specific system events occur. Unlike metric alerts, these do not use thresholds — the event itself is the trigger.

EventDescriptionDefault Severity
deployment.failedA deployment build or rollout failedwarning
node.offlineA node stopped responding to health checkscritical
backup.failedA scheduled backup job did not complete successfullywarning
container.restartA container restarted unexpectedly (crash loop detection)info

Create an event-based alert rule

bash
curl -X POST https://system.rouic.com/api/v1/alerts/rules \
  -H "Authorization: Bearer rk_YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Deployment Failed",
    "type": "event",
    "event": "deployment.failed",
    "severity": "warning",
    "cooldown": 60,
    "channels": ["email", "slack", "discord"]
  }'

Alert Rules

An alert rule defines what to monitor, when to fire, and how to notify. Each rule is configured with the following properties:

  • Threshold — The numeric value that triggers the alert (metric alerts only)
  • Comparison Operator — How the current value is compared to the threshold: >, <, or ==
  • Severity — The urgency level: info warning critical
  • Channels — One or more notification channels to deliver the alert to
  • Cooldown — Minimum seconds between repeated alerts for the same rule

Full alert rule schema

json
{
  "name": "string",
  "type": "metric | event",
  "metric": "cpu_usage | memory_usage | disk_usage | system_load | container_count",
  "event": "deployment.failed | node.offline | backup.failed | container.restart",
  "operator": "> | < | ==",
  "threshold": "number",
  "severity": "info | warning | critical",
  "cooldown": "number (seconds)",
  "channels": ["email", "webhook", "slack", "discord"]
}

Notification Channels

Alerts can be delivered through multiple channels simultaneously. Configure channels in the alerts settings or via the API.

Email

Sends an email to configured recipients with alert details, severity, and a link to the dashboard.

Config: recipients (array of email addresses)

Webhook

Sends a POST request with a JSON payload to any URL. Useful for custom integrations and automation pipelines.

Config: url (HTTPS endpoint)

Slack

Posts a formatted message to a Slack channel using an incoming webhook URL.

Config: webhookUrl (Slack incoming webhook URL)

Discord

Posts a rich embed message to a Discord channel using a webhook URL.

Config: webhookUrl (Discord webhook URL)

Configure a webhook channel

bash
curl -X POST https://system.rouic.com/api/v1/alerts/channels \
  -H "Authorization: Bearer rk_YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "webhook",
    "name": "PagerDuty Integration",
    "config": {
      "url": "https://events.pagerduty.com/integration/YOUR_KEY/enqueue"
    }
  }'

Cooldown & Storm Prevention

To prevent alert storms — where a flapping metric or repeated event floods your notification channels — every alert rule has a configurable cooldown period.

  • How it works — After an alert fires, the same rule will not fire again until the cooldown period has elapsed, even if the condition is still met.
  • Default cooldown — 300 seconds (5 minutes) for metric alerts, 60 seconds for event alerts.
  • Custom cooldown — Set the cooldown field in seconds when creating or updating a rule.
  • Per-rule — Each rule has its own independent cooldown timer. A CPU alert cooling down does not block a memory alert from firing.

Default Rules

When you first enable alerts, the platform automatically creates a set of sensible default rules. You can modify or disable these at any time.

RuleTypeConditionSeverity
Deployment Failedeventdeployment.failedwarning
Node Offlineeventnode.offlinecritical
Backup Failedeventbackup.failedwarning

Alerts Dashboard

The /alerts page in the platform dashboard provides a complete overview of your alerting setup.

Active Alerts

Currently firing alerts with severity, timestamp, and affected resource. Acknowledge or resolve alerts directly from this view.

Alert History

A chronological log of all alerts that have fired, including when they were resolved. Filter by severity, rule, or time range.

Rule Configuration

Create, edit, enable, or disable alert rules. Test rules by sending a test notification to all configured channels.

Webhook Payload Format

When an alert fires and a webhook channel is configured, the platform sends a POST request with the following JSON payload:

Webhook POST body

json
{
  "alert": {
    "id": "alt_abc123",
    "name": "High CPU Usage",
    "type": "metric",
    "metric": "cpu_usage"
  },
  "rule": {
    "id": "rul_def456",
    "operator": ">",
    "threshold": 90
  },
  "value": 94.2,
  "timestamp": "2026-04-12T14:32:00Z",
  "severity": "warning",
  "node": {
    "id": "node_ghi789",
    "name": "worker-01"
  }
}

Response expectations

  • The platform expects a 2xx status code to confirm delivery.
  • If the endpoint returns a non-2xx status or times out (10s), the delivery is retried up to 3 times with exponential backoff.
  • Failed deliveries are logged in the alert history for debugging.

Slack & Discord Integration

The platform sends rich formatted messages to Slack and Discord using their incoming webhook APIs. Here is how to set up each integration.

Slack Setup

  1. Go to Slack App Directory and create a new app (or use an existing one).
  2. Enable Incoming Webhooks in the app settings.
  3. Add a new webhook to the channel where you want alerts delivered.
  4. Copy the webhook URL and add it as a Slack channel in the platform.

Add Slack channel via API

bash
curl -X POST https://system.rouic.com/api/v1/alerts/channels \
  -H "Authorization: Bearer rk_YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "slack",
    "name": "ops-alerts",
    "config": {
      "webhookUrl": "https://hooks.slack.com/services/T00/B00/xxxxx"
    }
  }'

Discord Setup

  1. In your Discord server, go to Channel Settings > Integrations > Webhooks.
  2. Click New Webhook, give it a name, and select the target channel.
  3. Copy the webhook URL and add it as a Discord channel in the platform.

Add Discord channel via API

bash
curl -X POST https://system.rouic.com/api/v1/alerts/channels \
  -H "Authorization: Bearer rk_YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "discord",
    "name": "server-alerts",
    "config": {
      "webhookUrl": "https://discord.com/api/webhooks/1234567890/abcdef"
    }
  }'

Example Slack message payload (sent automatically by the platform)

json
{
  "text": ":warning: Alert: High CPU Usage",
  "attachments": [
    {
      "color": "#f59e0b",
      "fields": [
        { "title": "Severity", "value": "warning", "short": true },
        { "title": "Node", "value": "worker-01", "short": true },
        { "title": "Value", "value": "94.2%", "short": true },
        { "title": "Threshold", "value": "> 90%", "short": true }
      ],
      "ts": 1744468320
    }
  ]
}

Example Discord embed payload (sent automatically by the platform)

json
{
  "embeds": [
    {
      "title": "Alert: High CPU Usage",
      "color": 15902016,
      "fields": [
        { "name": "Severity", "value": "warning", "inline": true },
        { "name": "Node", "value": "worker-01", "inline": true },
        { "name": "Value", "value": "94.2%", "inline": true },
        { "name": "Threshold", "value": "> 90%", "inline": true }
      ],
      "timestamp": "2026-04-12T14:32:00Z"
    }
  ]
}