Skip to main content

ankra alerts

Manage where Ankra delivers alerts and platform notifications. Destinations are the endpoints notifications are sent to: a webhook URL (Slack, Microsoft Teams, Discord, PagerDuty, or any custom receiver) or a Slack/Teams channel the Ankra bot posts to directly. Routes decide which notifications reach which destination, filtered by kind, severity, cluster, and source, so the whole alerting setup can live in scripts and CI next to the rest of your platform configuration. ankra alerts destinations list ankra alerts destinations create —name ops-slack —url https://hooks.slack.com/services/… ankra alerts destinations test <destination-id> ankra alerts routes create —destination-id <destination-id> —severity critical ankra alerts routes list -o json

ankra alerts destinations

Manage the organisation’s alert destinations. A destination is either a webhook URL or a channel-based Slack/Teams destination that carries a channel id instead of a URL (list the channels the Ankra bot can post to with ‘ankra alerts destinations channels’). Webhook URLs are shown masked on every read.

ankra alerts destinations channels

List the channels the Ankra bot can post to, for use with ‘ankra alerts destinations create —channel-id’. Both providers are shown unless —provider narrows it to one. A provider whose workspace or tenant is not connected to the organisation reads “not connected”; one whose bot service is not configured on this platform reads “not available”. Neither is an error.
Flags

ankra alerts destinations create

Create an alert destination. Pass —url for a webhook destination, or —channel-id for a channel-based Slack or Teams destination (find ids with ‘ankra alerts destinations channels’); a Teams channel also needs —teams-tenant-id. —type records which receiver the destination targets (slack, teams, discord, pagerduty, custom; default slack) and selects the default payload format; —template-file overrides the payload with your own template. ankra alerts destinations create —name ops-slack —url https://hooks.slack.com/services/… ankra alerts destinations create —name oncall —type pagerduty —url https://events.pagerduty.com/… ankra alerts destinations create —name ops-teams —type teams —channel-id 19:[email protected] —teams-tenant-id <tenant>
Flags

ankra alerts destinations delete

Delete an alert destination. Routes that pointed at it stop delivering; remove or re-point them with ‘ankra alerts routes’.
Flags

ankra alerts destinations get

Show one alert destination
Flags

ankra alerts destinations list

List the organisation’s alert destinations, 20 per page. Filter by name with —search and by state with —enabled or —disabled. The ID column is what routes and the other destination commands take. ankra alerts destinations list —search slack ankra alerts destinations list —disabled -o json
Flags

ankra alerts destinations test

Send a sample notification to a stored destination and report whether the receiver accepted it. A failed delivery exits non-zero so CI can gate on it; the details are still printed (or emitted with -o json).
Flags

ankra alerts destinations test-url

Send a sample notification to an ad-hoc webhook URL, optionally with a custom payload template, without creating a destination. A failed delivery exits non-zero. ankra alerts destinations test-url —url https://hooks.slack.com/services/… ankra alerts destinations test-url —url https://example.com/hook —template-file payload.json
Flags

ankra alerts destinations update

Update an alert destination. Only the flags you pass are changed; the rest keep their current values. ankra alerts destinations update <destination-id> —url https://hooks.slack.com/services/new ankra alerts destinations update <destination-id> —disabled
Flags

ankra alerts routes

Manage the organisation’s notification routes. A route sends notifications matching every filter it sets (kind, severity, cluster, source) to one destination; a route with no filters matches everything. Routes are evaluated in ascending priority, mode “exclude” withholds matches instead of delivering them, and —stop-on-match ends the walk at that route so lower-priority routes never see the notification. ankra alerts routes create —destination-id <destination-id> —severity critical ankra alerts routes create —destination-id <destination-id> —kind execution_failed —cluster-id <cluster-id> —priority 10 ankra alerts routes update <route-id> —disabled ankra alerts routes test <route-id>

ankra alerts routes create

Create a notification route to a destination. Every filter is optional; a route with none matches every notification. Kinds include execution_failed, resource_deployment_failed, resource_health_degraded, alert_trigger_fired, gitops_sync_failed, agent_offline, security_new_severe_cves, and the other platform notification kinds; severities are critical, warning, and info. ankra alerts routes create —destination-id <destination-id> —severity critical ankra alerts routes create —destination-id <destination-id> —kind gitops_sync_failed —mode exclude —stop-on-match
Flags

ankra alerts routes delete

Delete a notification route
Flags

ankra alerts routes list

List notification routes
Flags

ankra alerts routes test

Queue a sample notification through a route’s destination. Delivery is asynchronous: the command returns the delivery id once the sample is queued, not once the receiver has accepted it.
Flags

ankra alerts routes update

Update a notification route. Only the flags you pass are changed; the rest keep their current values. ankra alerts routes update <route-id> —priority 5 —stop-on-match ankra alerts routes update <route-id> —destination-id <other-destination-id> ankra alerts routes update <route-id> —disabled
Flags