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
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.
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 delete
Delete an alert destination. Routes that pointed at it stop delivering; remove or re-point them with ‘ankra alerts routes’.ankra alerts destinations get
Show one alert destinationankra 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 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).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 update
Update an alert destination. Only the flags you pass are changed; the rest keep their current values.ankra alerts ingest-credentials
Ingest credentials are the per-credential secrets an external Alertmanager or log monitor uses to deliver alerts into Ankra. A credential is pinned to one cluster (scope cluster), carries the platform’s own alerts with no pin (scope platform), or does both from a self-hosting cluster (scope mixed). The notifier posts to <platform>/webhooks/alerts/<credential-id> with the token as a Bearer Authorization header (or an X-Ankra-Alert-Token header). The token is minted by create and shown that once; it cannot be read back. A rebind moves the pin or the scope on the existing credential, so the notifier keeps delivering; a delete revokes the credential.ankra alerts ingest-credentials create
Mint an ingest credential for an external Alertmanager or log monitor. The output carries the credential id, the webhook URL the notifier posts to, and the token. The token is shown this once and cannot be read back: store it in the notifier’s configuration (or a secret) straight away.--cluster pins the credential to a cluster, by name or id. --scope is
cluster (the default), platform (the platform’s own alerts, never pinned)
or mixed (both, always pinned).
--token-file writes the token to a new file with mode 0600 and leaves it out
of the output, -o json included, so automation never prints the secret. The
file must not exist yet.
Alertmanager delivers with a webhook receiver:
ankra alerts ingest-credentials delete
Delete an alert ingest credential. Its token is revoked: every delivery the notifier makes with it from then on is refused. Asks first;--yes skips the
question, and without it a non-interactive run is cancelled.
ankra alerts ingest-credentials list
List the organisation’s alert ingest credentials with the cluster each one is pinned to. A pin whose cluster is deleted, archived, slated for deletion or gone shows as BROKEN: the notifier still delivers, but its alerts have no cluster to land on until the credential is rebound.ankra alerts ingest-credentials rebind
Rebind an ingest credential: pin it to another cluster, unpin it, or change its scope. The token is untouched, so the notifier keeps delivering through the same credential. Pass--cluster with a cluster name to pin, --unpin to clear the pin, and
--scope with cluster, platform or mixed. A platform-scoped credential
carries no pin; a mixed one must keep one.
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
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.--application limits a route to one application’s notifications (pipeline
runs, image gates, previews); --reference-pattern to the branches, tags or
pull requests a glob matches. “main” matches pushes to main and never a pull
request targeting main; “pull/” matches every pull request; “release/” one
path segment and “release/**” any depth; “refs/tags/v*” tags.
A route belongs to a project and delivers only that project’s notifications
(those about its tickets, applications, pipeline runs, clusters and the
rest). With neither --project nor --organisation-wide the route is created in
your current project (‘ankra project current’; a project-pinned token always
uses its pin). The global --project <id|slug|name> creates it in that
project. --organisation-wide creates a route that delivers every project’s
notifications and the organisation’s own (billing and the like); it needs
alerts.manage at organisation scope. Move an existing route with
‘ankra project move --kind notification_route --id <route-id> --to <project>’.
ankra alerts routes delete
Delete a notification routeankra alerts routes list
List notification routesankra alerts routes preview
Resolve a hypothetical notification against the organisation’s routing rules and, with--alert-id, that alert’s own destinations, and print the
destinations it would reach with the reason each one matched.
Nothing is delivered and nothing is changed - this is a dry run.
Pass --alert-id whenever you preview an alert firing. A destination reached
by both the alert’s own list and a routing rule is delivered to once, and
without the alert id the preview cannot tell you which rule that affects.
--project resolves the notification as one of that project’s: only routes of
that project and organisation-wide routes take part in the walk.
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.ankra alerts routes update
Update a notification route. Only the flags you pass are changed; the rest keep their current values.ankra alerts rules
Manage the organisation’s alert definitions: the rules Ankra evaluates against your clusters and opens incidents from. Reading needs alerts.read. Creating, editing and deleting a definition needs alerts.manage; muting one (disable) and re-enabling it needs alerts.write, the same as acknowledging or snoozing a firing.ankra alerts rules create
Create an alert definition. The file carries the platform’s create body, in YAML or JSON: name, description, enabled, rules (each with name, resource_type, conditions, severity and the clusters it applies to) and the integration_names of the destinations to notify. Pass -f - to read stdin.ankra alerts rules delete
Delete an alert definition and its rules. Its incident history stops being evaluated; to stop it notifying while keeping it, use ‘ankra alerts rules disable’ instead.ankra alerts rules disable
Mute an alert definition; its history is keptankra alerts rules enable
Re-enable a muted alert definitionankra alerts rules get
Show one alert definitionankra alerts rules list
List the organisation’s alert definitions, 20 per page. Filter by name with--search, by state with --enabled or --disabled, and by
the rules’ --severity, --resource-type or --cluster-id.