Before you start
- A role that manages alerts to add, change, switch or delete rules in the portal. A role that can only read alerts sees Your role can look at alert rules but not change them. Someone who manages alerts can. See Roles and access.
- A destination for the alert to tell, such as a Slack channel or a webhook. Add one under Integrations & alerts → Notification destinations, see Webhooks. Without one, notification routes decide who is told.
Add an alert rule
- Portal
- CLI
- MCP
- Open Integrations & alerts → Alert rules (
/next/organisation/alert-rules) and click Add alert rule. - In Add an alert rule, enter a Name (up to 100 characters) and, if you like, a Description, which is shown with the alert when it fires.
- Under Watch, choose Clusters (whether a cluster is online, its GitOps sync, metrics and CVEs) or What runs on clusters (add-ons, manifests, Stacks and GitOps repositories, and the jobs that deploy them).
- For What runs on clusters, tick the Kinds to watch (none ticked watches every kind) and, if you like, enter Name contains to watch only resources whose name contains that text.
- Set Condition 1: What to check, then the State or Measure, the Comparison and, for a number, the Threshold. The conditions below list every choice. Add condition adds another, up to ten; set Together with the condition before to And: both must match or Or: either one is enough.
- Under Where, choose Every cluster (including clusters added later) or Only the clusters or environments I choose, then tick Clusters or Environments. An environment covers every cluster in it, including ones added later.
- Choose the Severity: Critical, Warning or Info.
- Set the timing: Wait before firing (minutes) and Quiet time after firing (minutes).
- Under Tell these destinations, tick the destinations to notify.
- Click Add alert rule.
Conditions
These are the conditions Ankra’s rule evaluator implements, and the only ones the portal offers. MCP and Ankra AI refuse any other; from the CLI or the API, a condition outside them saves without complaint and never fires.Watch: Clusters
Watch: What runs on clusters
Kinds to watch are Add-ons, Manifests, Stacks, GitOps repositories on GitHub, GitOps repositories on Bitbucket Cloud and GitOps repositories on Bitbucket Data Center.
In the CLI and API, the values are lower case with underscores:
cluster_state, gitops_sync, metric_threshold, metric_absence, security_findings, resource_state and job_status, with values such as offline, cpu_utilisation_pct, pods_pending, pods_failed, new_severe_cves, down or failed, and operators eq, neq, gt, gte, lt and lte.
Timing
So a rule on Cluster connection Is Offline with no wait set fires after the cluster has been offline for 5 minutes, not the moment it drops.
Who is told
An alert firing goes to the destinations ticked on the rule, and to every destination a notification route sends alert firings to. A destination reached both ways gets the firing once. A route can also filter by application and by branch or pull request, but an alert firing carries neither, so a route that sets either filter never matches one. See Scope a route to one application and its default branch. If you have set a home channel, a critical or warning notification that no destination or route handles goes there, so it is never missed.Follow a firing
- Ankra AI → Watching → All signals (
/next/ai/alerts) lists every alert with its severity, environment, the work on it and when it last fired. The views All signals, Firing, Resolved and Disabled rules narrow the list, with search and a Severity filter. - An alert’s page shows whether the platform reports it firing, Work on this alert (the tickets linked to it), Related agent runs and Signal details. Open it from the list, or from the rule’s options menu with Open the alert.
- Each firing is also a notification under the bell. Its page shows What happened, an AI analysis when Ankra has made one, and How to fix it. See Notifications and Needs you.
alerts.write:
Alerts from your own Alertmanager
An Alertmanager you already run can post its alerts into Ankra through an alert ingest credential. Each alert it sends shows on Alert rules with the badge From Alertmanager; its conditions are your monitoring system’s, so in Ankra you change only its name, description and destinations. See Send your Alertmanager alerts to Ankra, which also covers silencing alerts in a cluster’s Alertmanager.Verify
- On Integrations & alerts → Notification destinations, use Send a test on each destination the rule tells, and check that the sample arrives.
- On Integrations & alerts → Notification routes, use Where would it go? with Kind set to Alert firing and the rule’s severity, and check the destinations listed.
- Check the rule’s row on Alert rules: it is switched on, and its sentence names the clusters you meant.
What can go wrong
The rule never fires.- The row shows Off. Switch it on.
- Where does not cover the cluster. Open Change… and check Clusters and Environments.
- The conditions have not matched for the whole Wait before firing time, or the alert fired less than Quiet time after firing ago.
- The row says No conditions yet, so it never fires. Add a condition.
- A rule made outside the portal uses a condition the evaluator does not implement. Its form says Its conditions use a form this page cannot show, so they stay as they are and cannot be changed here yet. Such a condition never fires: recreate the rule with the conditions above.
Related
- Alert in Slack when a manifest fails to deploy - a worked example
- Webhooks - destinations, payloads and variables
- Notification routing - send firings to more places, or keep them away
- Notifications and Needs you - where firings land in Ankra