---
title: "ezgh obs alert-rules"
description: "Alert rules: conditions on metrics, logs and traces, evaluated every minute."
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.ezghcloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ezgh obs alert-rules

{/* Generated by ezgh-cli's internal/tools/clidocs from the ezgh command tree. Don't edit: change the command's help in ezgh-cli and regenerate. */}

```sh
ezgh obs alert-rules <command>
```

An alert rule is a condition on a project's metrics (PromQL), logs or traces that obs evaluates every minute. Each label set it matches is an alert instance: pending, then firing once the condition has held for the rule's for, and resolved when it stops. Rules notify their contact points (`ezgh obs contact-points`) as instances fire and resolve; silences (`ezgh obs silences`) mute them. A rule is in a project (`--project`), named by ID, slug (alr\_…) or name, and is a JSON document that apply takes as a file, so rules can live in Git. `ezgh obs alert-rules import` brings in the alerting rules of Prometheus rule files.

Part of [`ezgh obs`](/cli/reference/obs).

## Flags

This command also takes the [global flags](/cli/reference#global-flags).

## Subcommands

| Command | Description |
| --- | --- |
| [`ezgh obs alert-rules apply`](/cli/reference/obs-alert-rules-apply) | Create or update an alert rule from a JSON file |
| [`ezgh obs alert-rules delete`](/cli/reference/obs-alert-rules-delete) | Delete an alert rule |
| [`ezgh obs alert-rules get`](/cli/reference/obs-alert-rules-get) | Show an alert rule and its current instances |
| [`ezgh obs alert-rules import`](/cli/reference/obs-alert-rules-import) | Import the alerting rules of a Prometheus rule file |
| [`ezgh obs alert-rules list`](/cli/reference/obs-alert-rules-list) | List the project's alert rules |
| [`ezgh obs alert-rules test`](/cli/reference/obs-alert-rules-test) | Evaluate a rule file once, without saving it |

Source: https://docs.ezghcloud.com/cli/reference/obs-alert-rules/index.mdx
