Skip to main content

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 http://localhost:8080/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)."

Response Example

A successful request returns a status 200 OK.

FeedbackOpens in a new tab