---
title: "anomalies rules update"
description: "Update an anomaly rule"
canonical: "https://pgbeam.com/docs/cli/anomalies/rules/update"
last-updated: "2026-09-25T00:34:28.000Z"
---

# anomalies rules update

> Update an anomaly rule

URL: https://pgbeam.com/docs/cli/anomalies/rules/update

Replaces the rule's scope, metric and sensitivity. A rule whose enabled flag is turned off silences its metric for its scope rather than being deactivated.

## Usage

## Options

Option

Description

Required

Default

`<id>`

Yes

-

`--credential-id <value>`

Agent credential to scope the rule to. Null or omitted applies it to every credential in the project. The credential must belong to this project.

No

-

`--metric <value>`

One of the five detection metrics. A rule retunes how sensitive one of them is; it adds no detection algorithm and no alert kind. One of: queries\_per\_hour, bytes\_per\_hour, distinct\_shapes, errors\_per\_hour, active\_hours.

Yes

-

`--sigma-threshold <value>`

N in the "mean + N \* dispersion" spike rule. Must be greater than zero; the detector reads any value at or below zero as "use the default", so a stored zero could never mean what setting it would suggest. Rejected for distinct\_shapes and active\_hours, which have no rate for sigma to put a threshold on. Null or omitted leaves the deployment default in place.

No

-

`--floor <value>`

Absolute floor below which the metric never alerts. Must be greater than zero, for the same reason as sigma\_threshold. Rejected for distinct\_shapes and active\_hours, which have no rate for a floor to bound. Null or omitted leaves the deployment default in place.

No

-

`--enabled <value>`

False silences this metric for this scope. The baseline keeps advancing while it is silenced, so re-enabling resumes from the existing history rather than a cold warm-up.

No

-

All global options (`--token`, `--profile`,
`--project`, `--org`, `--json`, `--no-color`, `--no-trunc`, `--debug`) are
also available on this command.

## Examples

## Output

Renders a human-readable table or detail view by default; pass `--json` for the raw API response.