Skip to main content
Alerting & Response/Alert Routing & Policies

ReceiveVmalertAlerts

Receive authenticated packaged-vmalert notifications through the Alertmanager API-compatible notifier endpoint. The installer-managed X-Webhook-Secret is required and is shared only by zmetis and the two packaged vmalert instances.

POST/api/v2/alerts

Operation ID

ReceiveVmalertAlerts

Since

1.2.0

Execution Mode

Synchronous

Auth Context

Packaged vmalert

Auth Context

X-Webhook-Secret must contain the installer-managed packaged-vmalert secret. The legacy Alertmanager webhook secret is separate.

X-Webhook-Secret
{packaged_vmalert_secret}

Request Inputs

application/json

Header Parameters

  • X-Webhook-Secret
    StringRequired

    Required installer-managed packaged-vmalert secret. Never pass it in the URL or request body.

Body Fields

vmalert posts a top-level Alertmanager protocol v2 alert array to /api/v2/alerts.

Request body root type: array

  • status
    String

    Alert status: firing or resolved

    Example: firing

  • fingerprint
    String

    Unique fingerprint for deduplication

    Example: abc123def456

  • generatorURL
    String

    URL to the alert source in the generator system

    Example: http://prometheus:9090/graph?g0.expr=up

  • labels
    LinkedHashMap

    Key-value labels attached to this resource

  • annotations
    LinkedHashMap

    Arbitrary key-value annotations for metadata

Responses

200 OK

Successful response

Content-Type: application/json

Response body root type: object

  • received
    Integer

    Number of alerts received in the payload

    Example: 5

    {"format":"int32"}

  • created
    Integer

    Number of new alerts created

    Example: 3

    {"format":"int32"}

  • updated
    Integer

    Number of existing alerts updated

    Example: 1

    {"format":"int32"}

  • skipped
    Integer

    Number of duplicate alerts skipped

    Example: 1

    {"format":"int32"}

  • injected
    Integer

    Number of alerts injected into the pipeline

    Example: 4

    {"format":"int32"}

  • fallback
    Boolean

    Whether fallback processing was used

    Example: false

  • fallbackReason
    String

    Reason for fallback if applicable

    Example: primary channel unavailable

  • Change Time

    AddedRequest parameters X-Webhook-Secret
    View API