> This page is for Itential Platform On-Prem, version 6 (default).
> For other versions, use one of these documentation indexes:
> - 6 (default): https://docs.itential.com/itential-platform/6/llms.txt
> - 2023.2: https://docs.itential.com/itential-platform/2023-2/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.itential.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.itential.com/_mcp/server.

# Set up job capacity alerts

> Load Prometheus decision-matrix alert rules, route them through Alertmanager, and add recommended-metric alerts for Itential Platform job capacity.

Turn the [decision matrix](/itential-platform/monitor/job-capacity/baseline#decision-matrix) into Prometheus alerts. You need the [baseline](/itential-platform/monitor/job-capacity/baseline) first.

## Plan your alerts

The rules, recording rules, and routing in this topic use Prometheus and Alertmanager. If you use a different monitoring stack, recreate the same logic in it:

* Count job and task starts each minute, and compute the 30-day p99 of the busy minutes.
* Flag demand as above baseline when at least five of the last 15 minutes beat both your floor and 1.5 times the p99.
* Compute host CPU and Workflow Engine CPU per server, with Workflow Engine CPU as a percent of its thread ceiling.
* Combine the three signals for each row of the decision matrix, and require the condition to hold for the `for` duration before the alert fires.
* Route by severity, and suppress lower severities while a higher one fires for the same host.

The alerting plan has two parts. Decision-matrix alerts turn the matrix rows into alerts that name the action to take. Recommended-metric alerts cover data health, host, process, MongoDB, Redis, and downstream signals. Set up the data-health alerts first, because every other alert depends on them.

Itential documents thresholds for host, process, MongoDB, and Redis only. The rest are proposals to tune from your baseline.

* Use Itential's three tiers as severity labels: warning, critical, and emergency.
* Group by alert name and host, and suppress lower tiers while a higher one fires for the same host and resource.
* Run every new alert in notify-only mode for two weeks, count false positives, and tune before it pages anyone.

### Understand the `for` setting

Every alert rule in this topic has a `for` setting. It's a field in a Prometheus alert rule, not part of the PromQL query. It sets how long the alert condition must stay true, without a break, before the alert fires. For example, `for: 15m` means the condition must hold for 15 minutes in a row. If the condition drops out at any point, the timer starts again.

A longer `for` ignores short spikes and alerts later. A shorter one alerts sooner and more often. To see `for` in use, look at the `for:` line in each alert in the [rules file](#load-the-decision-matrix-rules). To change it, see the steps to shorten the alert window in that section.

### Decision-matrix alerts

Each alert matches one row of the matrix. Host CPU between 70% and 85% for 5 minutes raises ItentialHostCpuWarningBand regardless of demand. The healthy row needs no alert.

| Alert                      | Demand          | Host CPU   | Workflow Engine CPU, % of thread ceiling | For    | Severity |
| -------------------------- | --------------- | ---------- | ---------------------------------------- | ------ | -------- |
| ItentialOutOfCompute       | Above baseline  | Above 85%  | Any                                      | 10 min | Critical |
| ItentialRaiseWorkerThreads | Above baseline  | Below 70%  | 90% or more                              | 15 min | Critical |
| ItentialLimitElsewhere     | Above baseline  | Below 70%  | Below 70%                                | 15 min | Info     |
| ItentialPlatformDrivingCpu | Within baseline | Above 85%  | 90% or more                              | 15 min | Warning  |
| ItentialOtherProcessCpu    | Within baseline | Above 85%  | Below 75%                                | 15 min | Warning  |
| ItentialSharedProcessCpu   | Within baseline | Above 85%  | 75% to 90%                               | 15 min | Warning  |
| ItentialWorkflowEngineBusy | Within baseline | Below 70%  | 90% or more                              | 15 min | Info     |
| ItentialHostCpuWarningBand | Any             | 70% to 85% | Any                                      | 5 min  | Warning  |

The rules work as follows:

1. `itential:demand:job_start_1m` counts job starts each minute. `itential:demand:job_start_1m:p99_30d` is the p99 of busy minutes over 30 days. The task rules work the same way.
2. `itential:demand:above_baseline` is `1` when job or task starts are above baseline, and `0` otherwise. A signal counts as above baseline when the per-minute count beat both its floor and 1.5 times its p99 in at least five of the last 15 minutes. Requiring five of 15 stops one burst from tripping a decision.
3. `itential:host_cpu:busy_pct` and `itential:wfe_cpu:ceiling_pct` give host and Workflow Engine CPU per server. Both get a `host` label from the instance name, so the alerts can match `node_exporter` and `process_exporter` series for the same server.
4. Each alert combines the three signals. `and on (host)` pairs the two CPU figures from the same server, and `and on ()` adds the cluster-wide demand flag. The `for:` duration means the condition must hold that long before the alert fires.

#### Example scenarios

Assume a job p99 of 40 per minute, so the demand line is 60 jobs a minute. Workflow Engine figures are a percent of its thread ceiling, so they hold at any thread count once the divisor in the rules matches your `task_worker_thread_count`. The second scenario uses three threads to show the conversion.

| Alert                      | Scenario                                                                                                                     | What to do                                                                                                                                                                                                                                                                                                                                      | Time to fire |
| -------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ |
| ItentialOutOfCompute       | A month-end batch starts 90 to 110 jobs a minute. Host CPU sits at 88% to 92%. The Workflow Engine is at 95% of its ceiling. | The host is out of CPU, so more threads would compete for the same cores. Reduce or reschedule the load, or add a Platform node.                                                                                                                                                                                                                | About 15 min |
| ItentialRaiseWorkerThreads | 75 jobs a minute. Host CPU is 45%. With three threads, the Workflow Engine uses 2.8 cores, which is 93% of its ceiling.      | Go from three to four threads, then confirm host CPU stays below 80% and Workflow Engine CPU stays below 75%. At four threads, add a Platform node. For the thread limit and version requirement, see [Configure rate limits](/itential-platform/studio/optimize-workflow-engine-performance/configure-rate-limiting#task-worker-thread-count). | About 20 min |
| ItentialLimitElsewhere     | 70 jobs a minute. Host CPU is 40%. The Workflow Engine is at 50%. Jobs are slow.                                             | Check whether `task_worker_rate_limit` throttles, such as a limit of 20 tasks a second, whether Redis queue latency is over 1 ms, and whether a gateway server or NSO server is slow.                                                                                                                                                           | About 20 min |
| ItentialPlatformDrivingCpu | 30 jobs a minute. Host CPU is 90%. The Workflow Engine is at 96%.                                                            | Find the workflow responsible. Typical causes are a large loop, a retry storm, or a big data transform. Don't add threads.                                                                                                                                                                                                                      | About 20 min |
| ItentialOtherProcessCpu    | 25 jobs a minute. Host CPU is 88%. The Workflow Engine is at 30%.                                                            | Check the **Platform Process** tab. Typical causes are heavy API polling on Pronghorn Core, a misbehaving adapter, MongoDB on the same host, or a backup job.                                                                                                                                                                                   | About 20 min |
| ItentialSharedProcessCpu   | 28 jobs a minute. Host CPU is 90%. The Workflow Engine is at 80%.                                                            | Check the **Platform Process** tab for each process's share, then investigate the heavier one first: workflows if it is the Workflow Engine, otherwise the process or a recent change.                                                                                                                                                          | About 20 min |
| ItentialWorkflowEngineBusy | 35 jobs a minute. Host CPU is 50%. The Workflow Engine is at 93% for 20 minutes.                                             | None unless jobs are slow. If they are, add one thread, up to four, or lower `task_worker_rate_limit`. Change one setting at a time.                                                                                                                                                                                                            | About 20 min |
| ItentialHostCpuWarningBand | Host CPU climbs to 70% to 85% and stays, regardless of demand.                                                               | Check demand and the busiest processes before CPU passes 85%, where ItentialOutOfCompute, ItentialPlatformDrivingCpu, or ItentialOtherProcessCpu take over.                                                                                                                                                                                     | About 10 min |

Time to fire is the sum of three delays. Demand needs five busy minutes before the flag turns on. CPU values are 5-minute averages, so a sudden jump takes up to 5 minutes to show at full height. Then the `for:` duration must elapse.

No alert fires in these cases:

* Host CPU below 70% with Workflow Engine CPU between 70% and 90% is a watch zone. No alert fires, so watch the trend, and add your own rule if you need one for it.
* Short spikes don't trigger anything. If the Workflow Engine hits 100% for 3 minutes and drops back, the 15-minute window resets.

### Load the decision-matrix rules

#### Save the rules file

Save the rules in the following block as `itential-decision-matrix.rules.yml`. Load the file at the start of the [baseline](/itential-platform/monitor/job-capacity/baseline) phase so the recording rules collect 30 days of history. If you already did, the rules are running, so use these steps to change them. The alerts stay quiet until you connect Alertmanager.

#### Set the thread-count divisor

The rules ship with a divisor of `1` in `itential:wfe_cpu:ceiling_pct`, the Itential default for `task_worker_thread_count`. If you run more worker threads, replace it with the value set on one Platform instance. Don't use the total across instances, so two servers with three threads each use a divisor of `3`, not `6`. Every Platform host must use the same `task_worker_thread_count`, because the rules use one divisor for all of them. When you raise the thread count, update the divisor and reload Prometheus. Otherwise the ceiling is calculated too low and the Workflow Engine looks saturated too early.

#### Set the host regex

Replace `<itential-hosts>` with a regex for your Platform servers. Prometheus matches `=~` against the whole label value, and `instance` often includes a port or domain, such as `pe-iap01:9100`. For servers pe-iap01 and pe-iap02, this pattern is the safest:

```promql
instance=~"(pe-iap01|pe-iap02)(:.*|\\..*)?"
```

The shorter `pe-iap0[12].*` also matches names such as pe-iap010. The pattern `pe-iap.*` matches every server that starts with pe-iap, including ones you add later.

Confirm the match first. This query lists exactly your Platform servers:

```promql
up{instance=~"(pe-iap01|pe-iap02)(:.*|\\..*)?"}
```

#### Set the demand floors

The floor is the minimum number of starts per minute before demand can count as above baseline. It matters on quiet Platforms. With a 30-day p99 of 2 jobs a minute, 1.5 × p99 is only 3, and an ordinary small batch would trip every demand alert. Start each floor at your busy-minute p50, rounded up. The rules use 10 jobs and 50 tasks. Raise a floor if alerts fire on loads that caused no slowdown. Lower it if a real surge stayed under it. Recheck at each quarterly refresh.

#### Validate

Run `promtool check rules` against the file.

#### Reference the file

Add the file to `prometheus.yml`:

```yaml
global:
  scrape_interval: 15s
  evaluation_interval: 15s

rule_files:
  - /etc/prometheus/rules/itential-decision-matrix.rules.yml
```

#### Add a host label

Add a `host` label to every Itential scrape job, so alerts and Alertmanager inhibition can match one server across exporters. The itential.monitoring collection adds it for you. If you manage `prometheus.yml` yourself, add this to each job:

```yaml
relabel_configs:
  - source_labels: [__address__]
    regex: '([^:]+)(:\d+)?'
    target_label: host
    replacement: '$1'
```

#### Reload Prometheus

```bash
promtool check rules /etc/prometheus/rules/itential-decision-matrix.rules.yml
promtool check config /etc/prometheus/prometheus.yml
curl -X POST http://localhost:9090/-/reload
```

The reload endpoint needs Prometheus started with `--web.enable-lifecycle`. Otherwise, restart Prometheus. Then go to **Status** > **Rules** and confirm both groups loaded: `itential-decision-recording` and `itential-decision-alerts`. Run each expression in **Explore** before you trust it.

```yaml
groups:
  - name: itential-decision-recording
    rules:
      - record: itential:demand:job_start_1m
        expr: sum(increase(itential_job_start[1m]))
      - record: itential:demand:job_start_1m:p99_30d
        expr: quantile_over_time(0.99, (itential:demand:job_start_1m > 0)[30d:1m])
      # 1 when the per-minute job count beat 10 and 1.5x the p99 in at least five of the last 15 minutes
      - record: itential:demand:job_above_baseline
        expr: |
          (count_over_time((itential:demand:job_start_1m > 10
            and itential:demand:job_start_1m > 1.5 * scalar(itential:demand:job_start_1m:p99_30d))[15m:1m]) >= bool 5)
          or vector(0)

      - record: itential:demand:task_start_1m
        expr: sum(increase(itential_task_start[1m]))
      - record: itential:demand:task_start_1m:p99_30d
        expr: quantile_over_time(0.99, (itential:demand:task_start_1m > 0)[30d:1m])
      - record: itential:demand:task_above_baseline
        expr: |
          (count_over_time((itential:demand:task_start_1m > 50
            and itential:demand:task_start_1m > 1.5 * scalar(itential:demand:task_start_1m:p99_30d))[15m:1m]) >= bool 5)
          or vector(0)

      # 1 when jobs or tasks are above baseline, 0 when both are within baseline
      - record: itential:demand:above_baseline
        expr: clamp_max(itential:demand:job_above_baseline + itential:demand:task_above_baseline, 1)

      - record: itential:host_cpu:busy_pct
        expr: |
          label_replace(
            100 - avg by (instance) (rate(node_cpu_seconds_total{mode="idle",instance=~"<itential-hosts>"}[5m])) * 100,
            "host", "$1", "instance", "([^:]+).*")

      # Default divisor 1. Replace with task_worker_thread_count if you run more worker threads.
      - record: itential:wfe_cpu:ceiling_pct
        expr: |
          label_replace(
            100 * sum by (instance) (rate(namedprocess_namegroup_cpu_seconds_total{groupname="Pronghorn WorkFlowEngine Application"}[5m])) / 1,
            "host", "$1", "instance", "([^:]+).*")

  - name: itential-decision-alerts
    rules:
      - alert: ItentialOutOfCompute
        expr: itential:host_cpu:busy_pct > 85 and on () itential:demand:above_baseline == 1
        for: 10m
        labels: { severity: critical, category: decision, resource: cpu }
        annotations:
          summary: "Demand above baseline and host CPU above 85% on {{ $labels.host }}"
          description: "Out of compute under load. Reduce load or add Platform nodes. Don't raise threads. Look for unwanted processes using CPU."

      - alert: ItentialRaiseWorkerThreads
        expr: |
          itential:wfe_cpu:ceiling_pct >= 90
            and on (host) itential:host_cpu:busy_pct < 70
            and on () itential:demand:above_baseline == 1
        for: 15m
        labels: { severity: critical, category: decision, resource: cpu }
        annotations:
          summary: "Workflow Engine workers saturated with host headroom on {{ $labels.host }}"
          description: "Raise task_worker_thread_count by one, then confirm host CPU stays below 80%. At four threads, add Platform nodes."

      - alert: ItentialLimitElsewhere
        expr: |
          itential:wfe_cpu:ceiling_pct < 70
            and on (host) itential:host_cpu:busy_pct < 70
            and on () itential:demand:above_baseline == 1
        for: 15m
        labels: { severity: info, category: decision, resource: jobs }
        annotations:
          summary: "Demand above baseline with host and Workflow Engine headroom on {{ $labels.host }}"
          description: "The limit is elsewhere. If jobs are slow, check task_worker_rate_limit, Redis queue latency, and downstream systems."

      - alert: ItentialPlatformDrivingCpu
        expr: |
          itential:wfe_cpu:ceiling_pct >= 90
            and on (host) itential:host_cpu:busy_pct > 85
            and on () itential:demand:above_baseline == 0
        for: 15m
        labels: { severity: warning, category: decision, resource: cpu }
        annotations:
          summary: "Workflow Engine saturated and host CPU above 85% on {{ $labels.host }} without extra demand"
          description: "Check the Platform Process tab for each process's share of CPU, then look for heavier or looping workflows and recent changes. Don't add threads without investigating."

      - alert: ItentialOtherProcessCpu
        expr: |
          itential:wfe_cpu:ceiling_pct < 75
            and on (host) itential:host_cpu:busy_pct > 85
            and on () itential:demand:above_baseline == 0
        for: 15m
        labels: { severity: warning, category: decision, resource: cpu }
        annotations:
          summary: "Host CPU above 85% on {{ $labels.host }} while the Workflow Engine is below 75%"
          description: "Something other than the Workflow Engine is using CPU. Find the process and any recent change."

      - alert: ItentialSharedProcessCpu
        expr: |
          itential:wfe_cpu:ceiling_pct >= 75 < 90
            and on (host) itential:host_cpu:busy_pct > 85
            and on () itential:demand:above_baseline == 0
        for: 15m
        labels: { severity: warning, category: decision, resource: cpu }
        annotations:
          summary: "Host CPU above 85% on {{ $labels.host }} with the Workflow Engine between 75% and 90% of its ceiling"
          description: "The Workflow Engine and other Platform processes share the load. Check the Platform Process tab for each process's share of CPU, then investigate the heavier one first: workflows for the Workflow Engine, otherwise the process or a recent change."

      - alert: ItentialWorkflowEngineBusy
        expr: |
          itential:wfe_cpu:ceiling_pct >= 90
            and on (host) itential:host_cpu:busy_pct < 70
            and on () itential:demand:above_baseline == 0
        for: 15m
        labels: { severity: info, category: decision, resource: cpu }
        annotations:
          summary: "Workflow Engine busy at 90% or more of its thread ceiling on {{ $labels.host }}"
          description: "No action unless jobs are slow. If they are, raise task_worker_thread_count by one or lower task_worker_rate_limit. Change one setting at a time."

      - alert: ItentialHostCpuWarningBand
        expr: itential:host_cpu:busy_pct >= 70 <= 85
        for: 5m
        labels: { severity: warning, category: host, resource: cpu }
        annotations:
          summary: "Host CPU between 70% and 85% on {{ $labels.host }}"
          description: "Check demand and the busiest processes before CPU passes 85%."
```

To shorten the alert window, edit the file:

#### Change the duration

In each alert, change `for: 15m` to `for: 10m` or `for: 5m`. Change ItentialOutOfCompute from `for: 10m` to `for: 5m` if you want it faster too.

#### Change the demand window

In both `itential:demand:job_above_baseline` and `itential:demand:task_above_baseline`, change the window and the busy-minute count together.

| Window     | Replace `[15m:1m]) >= bool 5` with |
| ---------- | ---------------------------------- |
| 10 minutes | `[10m:1m]) >= bool 3`              |
| 5 minutes  | `[5m:1m]) >= bool 2`               |

#### Validate and reload

Run `promtool check rules` and reload Prometheus.

Don't go below 5 minutes. Host and Workflow Engine CPU use 5-minute rates, so a shorter `for:` adds noise without catching problems sooner.

### Use a fixed p99

By default, the demand alerts compare each minute with the 30-day p99 of your busy minutes. Use a fixed value instead in these cases:

* You have less than 30 days of history. Recording rules don't backfill, so until the history builds up, a missing p99 reads as within baseline and the demand alerts stay quiet.
* You want to alert against a number you chose, such as a ceiling you tested.

#### Replace the p99 rules

In the rules file, replace the `expr` of the two p99 rules with a fixed value:

```yaml
- record: itential:demand:job_start_1m:p99_30d
  expr: vector(40)     # static busy-minute p99, jobs started per minute
- record: itential:demand:task_start_1m:p99_30d
  expr: vector(300)    # static busy-minute p99, tasks started per minute
```

#### Choose the values

Enter the p99, not the alert threshold. The 1.5 × multiplier and the demand floor still apply. With a job p99 of 40, demand counts as above baseline when a minute starts more than 60 jobs. Use the same unit as your baseline: starts per minute, taken over busy minutes only.

#### Validate and reload

Run `promtool check rules` and reload Prometheus.

A fixed number doesn't follow growth. Update it each time you refresh your baseline. When you have 30 days of history, restore the original `quantile_over_time` expressions.

### Route alerts in Alertmanager

Prometheus evaluates the rules and sends firing alerts to Alertmanager. Prometheus doesn't notify anyone itself. Alertmanager groups, routes, and delivers the notifications.

Connect Alertmanager when you finish the baseline phase and want notifications. Add it under `alerting` in `prometheus.yml`:

```yaml
alerting:
  alertmanagers:
    - static_configs:
        - targets: ["alertmanager:9093"]
```

Every alert sets three labels. `severity` is `critical`, `warning`, `info`, or `emergency`. `category` is `decision`, `host`, or a recommended-alert category. `resource` is `cpu`, `memory`, `disk`, `network`, `mongodb`, `redis`, `jobs`, or `downstream`. The `host` label comes from the scrape relabeling. Add `host` and `resource` to any alert you write. The decision alerts use critical, warning, and info. The emergency tier is for Itential's tiered resource alerts. The following example pages on-call for emergency alerts, sends critical alerts to the team channel, and sends info and everything else to email.

```yaml
global:
  smtp_smarthost: "smtp.example.com:587"
  smtp_from: "alertmanager@example.com"

route:
  receiver: itential-email
  group_by: [alertname, host]
  group_wait: 30s
  group_interval: 5m
  repeat_interval: 4h
  routes:
    - matchers: [ severity="emergency" ]
      receiver: itential-oncall
      repeat_interval: 30m
    - matchers: [ severity="critical" ]
      receiver: itential-team
      repeat_interval: 1h
    - matchers: [ severity="info" ]
      receiver: itential-email
      repeat_interval: 24h

inhibit_rules:
  - source_matchers: [ severity="emergency" ]
    target_matchers: [ severity=~"critical|warning" ]
    equal: [ host, resource ]
  - source_matchers: [ severity="critical" ]
    target_matchers: [ severity="warning" ]
    equal: [ host, resource ]

receivers:
  - name: itential-email
    email_configs:
      - to: "platform-ops@example.com"
  - name: itential-team
    webhook_configs:
      - url: "https://chat.example.com/hook"
  - name: itential-oncall
    webhook_configs:
      - url: "https://pager.example.com/hook"
```

The inhibit rules match on `host` and `resource`, so a critical CPU alert quiets the warning CPU alerts on the same host but not a disk alert. An emergency memory alert quiets only the critical and warning memory alerts. The rules file sets `resource` on every alert, and `host` comes from the scrape relabeling.

Validate the configuration with `amtool check-config alertmanager.yml`, reload Alertmanager, and test routing with a test alert:

```bash
amtool alert add TestAlert severity=warning category=test --alertmanager.url=http://localhost:9093
```

If you use Grafana-managed alerting instead, create the same conditions as Grafana alert rules. The expressions carry over unchanged.

### Recommended-metric alerts

These alerts cover the other metrics you recorded in the baseline. The decision-matrix alerts already cover demand, host CPU, and Workflow Engine CPU, so they aren't repeated here. Host CPU between 70% and 85% for 5 minutes, which no matrix row covers, raises the ItentialHostCpuWarningBand warning in the decision-matrix rules file.

| Category    | Alert                                             | Fires when                                                                                                                                                                                                  | Severity | Threshold source                 |
| ----------- | ------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | -------------------------------- |
| Data health | Exporter down                                     | Any exporter's `up` is 0 for 5 minutes.                                                                                                                                                                     | Critical | Proposed                         |
| Data health | Job metrics missing                               | No job status series for 10 minutes.                                                                                                                                                                        | Critical | Proposed                         |
| Data health | Watcher reconnecting                              | More than three exporter reconnects to MongoDB in 30 minutes.                                                                                                                                               | Warning  | Proposed                         |
| Host        | Memory                                            | Above 75%, 85%, and 95% for 5, 5, and 2 minutes.                                                                                                                                                            | Tiered   | Itential                         |
| Host        | Disk space                                        | Above 75% for 10 minutes, 85% for 5, and 95% for 2.                                                                                                                                                         | Tiered   | Itential                         |
| Host        | Load per core                                     | Above 1.5 for 10 minutes.                                                                                                                                                                                   | Warning  | Proposed                         |
| Host        | Network I/O                                       | Above 80% of link speed for 10 minutes.                                                                                                                                                                     | Warning  | Proposed                         |
| Host        | Disk IOPS                                         | Above 80% of the volume's rated IOPS for 10 minutes.                                                                                                                                                        | Warning  | Proposed                         |
| Process     | Pronghorn Core and other process CPU              | Above 70%, 85%, and 95% of one core.                                                                                                                                                                        | Tiered   | Itential                         |
| Process     | Per-process memory, including the Workflow Engine | Above 75%, 85%, and 95%. Decide whether the base is host RAM or a limit.                                                                                                                                    | Tiered   | Itential                         |
| MongoDB     | Replication lag                                   | Above 10 s, 60 s, and 300 s.                                                                                                                                                                                | Tiered   | Itential                         |
| MongoDB     | Oplog window                                      | Under 24 h for 1 h, 12 h for 30 min, and 4 h for 15 min.                                                                                                                                                    | Tiered   | Itential                         |
| MongoDB     | Connections, disk latency                         | Per Itential's tiers.                                                                                                                                                                                       | Tiered   | Itential                         |
| MongoDB     | Read or write surge                               | Above two times the 30-day p95 for 15 minutes.                                                                                                                                                              | Warning  | Proposed                         |
| Redis       | Memory                                            | Above 80% or 95% of `maxmemory`.                                                                                                                                                                            | Tiered   | Itential                         |
| Redis       | Evictions                                         | Any for 5 minutes, then above 100 per second.                                                                                                                                                               | Tiered   | Itential                         |
| Redis       | Job-queue command latency                         | Average above 1 ms for 5 minutes, above 10 ms for 2 minutes.                                                                                                                                                | Tiered   | Itential's command-latency tiers |
| Redis       | Replicas, primary link, AOF fsync, auth failures  | Per Itential's tiers.                                                                                                                                                                                       | Tiered   | Itential                         |
| Sentinel    | Quorum, TILT, primary down                        | Per Itential's tiers.                                                                                                                                                                                       | Tiered   | Itential                         |
| Downstream  | Gateway server and NSO server CPU                 | Above 85% for 10 minutes.                                                                                                                                                                                   | Warning  | Proposed                         |
| Downstream  | Gateway server and NSO server memory              | Above 90% for 5 minutes.                                                                                                                                                                                    | Warning  | Proposed                         |
| Jobs        | Task errors on one node                           | Errors concentrated on one `server_id`.                                                                                                                                                                     | Warning  | Proposed                         |
| Jobs        | Cancellation spike                                | More than 10 cancels in 15 minutes.                                                                                                                                                                         | Warning  | Proposed                         |
| Jobs        | No jobs in business hours                         | Zero starts for an hour during business hours.                                                                                                                                                              | Info     | Proposed                         |
| Jobs        | Task start imbalance                              | One node starts under 10% of the average.                                                                                                                                                                   | Warning  | Proposed                         |
| Jobs        | Task completions stalled                          | Tasks keep starting but none completes for 10 minutes. This signals stuck workers, not capacity. Manual tasks never complete on their own, so it fires only when every automated task stops completing too. | Warning  | Proposed                         |
| Jobs        | Task completion rate drop                         | Task completions per minute fall below half their 30-day p50 for 15 minutes while task starts stay at or above their p50.                                                                                   | Warning  | Proposed, from your baseline     |

For the Itential tiers, see [Exporters](/itential-platform/monitor/exporters). The following rules are examples. Build the others the same way, and set the network and IOPS thresholds to your link speed and volume rating.

```yaml
groups:
  - name: itential-recommended-recording
    rules:
      - record: itential:mongo_writes:rate5m
        expr: sum(rate(mongodb_op_counters_total{type=~"insert|update|delete"}[5m]))

  - name: itential-recommended-alerts
    rules:
      - alert: MongoWriteSurge
        expr: itential:mongo_writes:rate5m > 2 * quantile_over_time(0.95, itential:mongo_writes:rate5m[30d])
        for: 15m
        labels: { severity: warning, category: mongodb, resource: mongodb }
        annotations:
          summary: "MongoDB writes are twice their 30-day p95"
          description: "Compare with job and task starts. Writes rising faster than starts mean heavier workflows."

      # 80% of a 1 Gbit/s link. Set to your link speed.
      - alert: HostNetworkNearLinkLimit
        expr: |
          (rate(node_network_receive_bytes_total{device!="lo"}[5m]) + rate(node_network_transmit_bytes_total{device!="lo"}[5m])) * 8 / 1e6 > 800
        for: 10m
        labels: { severity: warning, category: host, resource: network }
        annotations:
          summary: "{{ $labels.device }} on {{ $labels.instance }} above 800 Mbit/s"

      # 80% of a 3,000 IOPS volume. Set to your volume's rating.
      - alert: HostDiskIopsNearRating
        expr: sum by (instance) (rate(node_disk_reads_completed_total[5m]) + rate(node_disk_writes_completed_total[5m])) > 2400
        for: 10m
        labels: { severity: warning, category: host, resource: disk }
        annotations:
          summary: "Disk IOPS above 2,400 on {{ $labels.instance }}"

      - alert: DownstreamCpuHigh
        expr: 100 - avg by (instance) (rate(node_cpu_seconds_total{mode="idle",instance=~"<gateway-or-nso-hosts>"}[5m])) * 100 > 85
        for: 10m
        labels: { severity: warning, category: downstream, resource: cpu }
        annotations:
          summary: "Gateway server or NSO server {{ $labels.instance }} CPU above 85%"

      - alert: DownstreamMemoryHigh
        expr: 100 * (1 - node_memory_MemAvailable_bytes{instance=~"<gateway-or-nso-hosts>"} / node_memory_MemTotal_bytes{instance=~"<gateway-or-nso-hosts>"}) > 90
        for: 5m
        labels: { severity: warning, category: downstream, resource: memory }
        annotations:
          summary: "Gateway server or NSO server {{ $labels.instance }} memory above 90%"
```

Check each file with `promtool check rules` and run every expression in Prometheus before you load it.

These alerts leave out jobs that run too long, started-versus-completed gaps, and any capacity judgment built on completion counts or durations. Manual tasks and long-running jobs trigger those when nothing is wrong. The two task-completion alerts in the table are the exception. They watch for stuck workers, not capacity.

Per-runner job concurrency matters if you run gateway servers, but Itential describes it qualitatively and publishes no metric or threshold, so it isn't in this list.

## Next steps

* [Tune worker settings](/itential-platform/monitor/job-capacity/tune)