Skip to main content
Previous sectionNext section

PUT /api/sam/admin/alertrule/{clusterid}/

Replace alert rules for specific cluster


This method replaces the current alert settings for this cluster with the contents of the JSON array in the request body. The JSON request packet mirrors the JSON response packet for the GET /alertrule/:cluster/ endpoint.

To use this endpoint, you must log in as a user with access to the %SAM.Admin resource.

Request Example

PUT /api/sam/admin/alertrule/{clusterid}/

clusterid Required path variable. The id of the cluster.

Example Prometheus alert rule object:

        "expr":"iris_cpu_usage{cluster="local"} > 0",
        "labels": {
        "annotations": {
            "description":"iris_cpu_usage Critical: iris_cpu_usage = {{ $value }} (Critical value is 0)."
Copy code to clipboard

Response Example

A successful request returns a status 200 OK.

FeedbackOpens in a new window