New — Iris AI drafts your firewall, routing & rate-limit rules. Explore AI features →
Back to Blog
aiproduct

Generate Metric Alerts With AI

Describe what to watch in a sentence, such as error rate above 1% or p95 latency over 300 ms. Iris drafts the alert rules, and nothing is saved until you have chosen who gets the alerts.

6 min read

You know the alert you want: tell me when the checkout gets slow. The form wants a metric, a comparison, a number, a window and a pause between notifications. Iris, the assistant in the Ngris dashboard, fills that in from your sentence. That is how you generate metric alerts with AI here: you describe what to watch, Iris drafts the rules, and nothing is saved until you have chosen who gets the alerts.

What an alert rule holds

An alert rule watches one number over a stretch of time and notifies you when it crosses a line you set.

  • The metric: Request rate (requests per second), Error rate (the share of 4xx and 5xx answers, in percent), P95 latency, P99 latency (both in milliseconds), Inbound bandwidth or Outbound bandwidth (bytes per second).
  • The comparison and the threshold: is greater than, is at least, is less than or is at most, and a number.
  • The window: how far back the metric is computed, from one minute to one day.
  • The pause: how long the rule waits after notifying before it may notify again, so a number that hovers around the line does not fill your inbox.
  • The scope: all endpoints of the account, or one.
  • Who gets it: one or more notification channels. Email, a webhook, Slack or Discord.

Describe the alerts

Open Observability, then Alerts, and click Generate with Iris. A box asks you to describe the alerts you want. Write what you would say to a colleague on call:

# a few descriptions that work

Page me when error rate > 1% for 5 minutes, and when p95 latency exceeds 500ms. Tell me when p95 latency on checkout.example.com goes over 300 ms Alert when outbound bandwidth stays above 10 MiB per second for 15 minutes

Click Generate. One description can hold several alerts, and you get one rule for each. The first sentence above gives two:

Review the alerts

  • Error rate above 1% · Error rate > 1 % over 5m · All endpoints
  • P95 latency above 500 ms · P95 latency > 500 ms over 5m · All endpoints

Each drafted alert has a tick box, so you can leave one out. In the second sentence Iris reads the host name and ties the rule to that endpoint, if it is one of yours. Where you name no window, the draft uses 5 minutes, with a pause of 10 minutes between notifications. Both are yours to change.

Choose who gets them

Iris never decides where an alert goes. Even if your sentence names an address, the draft leaves it out. The review step has its own part for that, Notification Channels, and it wants at least one:

  • Email: the verified email of a member of the account.
  • Webhook: an HTTPS address of yours. Give it a secret and each call is signed with it, so your receiver can check that it comes from Ngris.
  • Slack or Discord: an incoming-webhook address. That address works like a password. Once saved, the dashboard shows only its domain.

Then click Create alerts. Nothing is saved before that click.

One alert, on the form

New Alert opens the form for a single rule, and its condition has the same button. There the draft fills in one line you can read like a sentence:

Alert Condition

  • IF P95 latency is greater than 300 ms
  • OVER last 5 minutes
  • RE-FIRE AFTER 10 minutes
  • Current value: 212 ms · Below threshold

The last line is the reason to use the form for an alert that matters. It shows what the metric is right now, over the window you chose. A threshold of 300 ms means one thing when your traffic sits at 212 ms and another when it sits at 290.

Test it before you rely on it

An alert that fires into a channel nobody reads is worse than none. Send test delivers one sample notification and tells you whether it arrived. On the list, each rule's menu also has View events: when the rule fired, and what was delivered to whom.

What an alert does, and what it does not

An alert tells you. It changes nothing. Slow answers usually point at your own service, and what to do about them is your call. If the answer is a rule, a firewall rule or a rate limit, Iris can draft that too, and it comes on a confirmation card you approve first.

When an alert does fire, the Traffic Inspector is the next stop: filter to the endpoint and the minutes in question and look at the requests behind the number.

Good to know

  • The button only creates. To change, switch off or delete an alert, use its menu on the list, or ask Iris in the chat.
  • A vague wish gets a question, not a guess. "Tell me when something is wrong" has no number in it. Iris asks you to name a threshold.
  • The chat drafts alerts too. There the alert comes as a confirmation card. Iris asks which member should get the email. A webhook, Slack or Discord address is always added by you.
  • You can ask what the number is now. "Would this alert fire right now?" is answered with the current value.
  • The six metrics are about traffic. A certificate about to expire or usage getting close to its allowance is reported without a rule of yours.

To try it you need one endpoint with some traffic:

# install the agent and sign in once

brew install ngris-edge/homebrew-tap/ngris ngris auth --token

# put a local app online

ngris http 3000

Then open Alerts and describe the first thing you want to hear about. The alerts guide has every field and shows how to check a webhook's signature.

Say the threshold, choose who hears about it

Describe what to watch in a sentence and get alert rules you can read before anything is saved.

Create a free account →
Ask an AI to summarise this page
Deploy
App hosting Edge functions Domains & certificates
Connect
Secure tunnels API gateway Multi-region edge
Protect
Bot protection & challenge WAF & firewall Edge login
Observe & AI
Monitoring Inspector & replay Iris AI MCP server AI Gateway
Developers
Developer tools Docs ngrok policy converter Blog Changelog
Compare
Ngris vs ngrok Ngris vs Cloudflare Tunnel Ngris vs Vercel Ngris vs Netlify Expose localhost guide
More
Solutions Pricing Enterprise Sign in Get Started Free