Skip to main content
Monitoring & Collection/Scrape Collection
POSTMonitoringSince 1.0SynchronousAuth Required

SetScrapeAlertRule

Create or update an alert rule for a specific scrape target

Execution Availability

Try It Out

Submit a mock request using the current auth context and example-driven inputs.

Path Parameters

Request Inputs

Path Parameters

  • targetIdStringRequired

    UUID of the scrape target to configure the alert rule for

Body Fields

  • consecutiveFailsIntegerRequired

    Consecutive failure threshold before alert fires

    Example: 3

  • severityStringRequired

    Severity of the generated alert (critical, warning)

    Example: critical

  • autoEscalateBooleanRequired

    Whether the alert escalates automatically after continued downtime

    Example: true

Responses

200 OK

On success, this API returns the following response structure.

  • uuidString

    Unique identifier of the scrape alert rule

    Example: alert-rule-001

  • targetIdString

    UUID of the scrape target this rule applies to

    Example: target-001-abc

  • consecutiveFailsInteger

    Number of consecutive failures before firing this alert

    Example: 3

  • severityString

    Severity level of the alert (critical, warning)

    Example: critical

  • autoEscalateBoolean

    Whether the alert should auto-escalate after extended downtime

    Example: true

  • createdAtString

    Created at

    Example: 2026-01-15T08:00:00Z

Endpoint

POST/api/v1/monitoring/scrape-health/targets/{targetId}/alert-rules

/api/v1/monitoring/scrape-health/targets/{targetId}/alert-rules

Operation ID

SetScrapeAlertRule

Permalink

Request Example

curl -X POST '{host}/api/v1/monitoring/scrape-health/targets/{targetId}/alert-rules' -H 'Authorization: Bearer {token}' -H 'Content-Type: application/json' -d '{"consecutiveFails":3,"severity":"critical","autoEscalate":true}'

Response Example

200
{
  "uuid": "alert-rule-001",
  "targetId": "target-001-abc",
  "consecutiveFails": 3,
  "severity": "critical",
  "autoEscalate": true,
  "createdAt": "example"
}

Change History

This API has no change history records yet.

View all change history