Skip to content
This page View Markdown Open in ChatGPT Open in Claude

Health Check AI Reporting

Your APIs answer thousands of calls a day. Analytics counts every one of them, but nobody reads the dashboard at 3 a.m. Health Check AI Reporting reads it for you. On a schedule, it looks at the numbers, checks them, and asks AI to explain what it finds. Then it mails you, when you want to be told. It also watches the packages your code uses, and tells you when one of them gets a known security problem.

In short

  • A report is a System Health Report (the numbers of Analytics) or a Vulnerability Report (the security of your packages).
  • A report looks at the numbers of a window of time : the last hour, the last 24 hours, the last 7 days…
  • Its checks find problems : error rates, latency, traffic that fell, servers short of memory.
  • An AI model reads the numbers and the checks, and writes what needs attention and how to fix it.
  • The mail goes every time, when something is wrong, or only for critical problems.
  • Every run is kept in the History, every call to a model in the AI calls, with its tokens and its cost.
AI Health Reports for Your APIs by Email: OpenAI, Claude, Gemini9 chapters and the transcript
Where The root user : Dashboard → Health Check AI Reporting. An admin : Dashboard → Operations → Health Check AI Reporting.
Whose numbers The root user : every admin, or one admin it picks. An admin : its own account.
Needs A key in AI Integration for the analysis, and a mail server in Outgoing Email (SMTP) for the mails : the root user's, or the admin's own.
Types System Health Report : the numbers of Analytics. Vulnerability Report : the known vulnerabilities of the packages of your sandboxes and of the server.
Schedules Every few hours, every day, some days of the week, once a month, or cron, in your time zone. At most every 15 minutes.
Costs Each report shows its tokens and its cost before it runs. A run with nothing to send asks no model.

How a run works

flowchart LR
    A[Schedule] --> B[Read the numbers of Analytics]
    B --> C[Run the checks]
    C --> D{Send a mail?}
    D -- no --> E[History : nothing to send]
    D -- yes --> F[Ask the AI model]
    F --> G[Mail : numbers, checks, analysis]
    G --> H[History and AI calls]
  1. The numbers. The report reads what Analytics collected for its window : every call, the kinds of API, the busiest, slowest and failing APIs, every server, every admin (for the root user), and the window before.
  2. The checks. They run with no AI and cost nothing. They decide the verdict : healthy, needs a look, or critical.
  3. The decision. A report which sends on problems only stops here when every check passes. No model is asked, no token is spent.
  4. The analysis. The model gets the numbers as short tables and the problems the checks found. It writes a summary, what needs attention, what goes well, and up to five actions.
  5. The mail. It holds four numbers beside the window before, the checks, the analysis, the lists of APIs and the servers, and what the model cost.

Every server looks at the reports every 30 seconds. The first one which takes a moment runs it : one run per moment, however many servers there are.

Make a report

Press New report, or start from one of the ideas of an empty page :

Idea Type Runs Looks at Mails
A daily summary System Health every day at 08:00 the last 24 hours every time, with the analysis
Tell me when something is wrong System Health every hour the last hour on problems, not the same ones twice in 6 hours
Wake me for critical problems System Health every 15 minutes the last 15 minutes on critical problems only
Tell me when my packages get vulnerable Vulnerability every day at 08:00 the packages of your sandboxes and of the server only when something changed

Choose the Type of report under About : System Health Report or Vulnerability Report. The ? beside it says what each one reads. The parts below follow the type you choose ; a Vulnerability Report has its own What, Checks and Mail.

The editor has five parts.

What

Setting What it does
Looks at The window of numbers : the last 15 minutes, hour, 3, 6, 12 or 24 hours, 7 or 30 days.
Whose numbers The root user : every admin, or one admin.
What it holds The parts of the numbers : the health of Analytics, the kinds of API, the busiest, slowest and failing APIs, the most time in all, every API, the servers, the admins, the window before. Fewer parts cost fewer tokens.
Rows of a list How many APIs each list holds, 3 to 50.
Every API, at most How many APIs the list of every API holds, 10 to 100.

When

The schedules of Automatic Backup : every few hours, every day, some days of the week, once a month, or an expression of cron. Each one has its time zone. The editor says the schedule in words, and how many runs the next 30 days hold.

Checks

One check a row : a switch to turn it on or off, its name, a ? which says in a few words what it looks at, then its Warning above and Critical above limits side by side. A check which only warns shows — as its critical limit. Turned off and on again, a check gets its numbers back.

Check Default A finding
Failed calls warning over 2 %, critical from 10 % the share of the calls which failed
Slow calls (p95) warning over 1,500 ms, critical from 4,000 ms 95 % of the calls were faster than this
Failed calls of one API over 10 % an API which fails, even when the others are fine
Slow calls of one API over 3,000 ms an API which is slow
Server errors (5xx) from 1 answer the server failed calls
Traffic fell by 60 % fewer calls than in the window before
Traffic grew by 300 % only a note : more calls than in the window before
Memory or disk full over 85 % a server short of room
Busy server (delay) over 200 ms a server with too much to do
Small APIs are skipped fewer than 20 calls an API with fewer calls raises no alarm
Health of Analytics on processes which do not answer, mixed versions, a full pool of connections

The verdict is critical when one finding is critical, needs a look when one is a warning, healthy otherwise.

Mail

Setting What it does
To The addresses, separated by commas. Up to 20.
Send a mail Every time, When something is wrong (a warning or worse) or Only critical problems. The chosen one is filled and ticked.
The same problems Problems told a moment ago are not told again before this many minutes. New problems are told at once.
Say when the problems are gone One mail when every check passes again.
Ask AI when everything is fine too Off, a mail with no problem holds the numbers and the checks only, and costs no token.
Subject starts with [Production], to tell your environments apart.

AI & prompt

Setting What it does
Ask AI to explain the numbers Off, the mail holds the numbers and the checks only.
Provider and model One of AI Integration, or the default one.
Key An admin : its own key, the one the root user shares, or its own first.
Longest answer 0 uses the setting of the provider.
Tone Concise (300 words), Detailed (600 words, every problem with its numbers) or For managers (200 words, the impact first).
Language The language the model writes in.
Prompt The prompt of API Maker, Add my instructions after it, or My own prompt.

A prompt of your own has placeholders :

Placeholder Becomes
{{data}} the numbers, as short tables
{{checks}} the problems the checks found, one a line
{{verdict}} HEALTHY, DEGRADED or CRITICAL (for a Vulnerability Report : nothing to fix, packages to fix, critical)
{{window}} the time the report covers, in words ; for a Vulnerability Report, the time of its audit
{{scope}} every admin, or one admin
{{language}} the language of the report
{{report}} the name of the report

A prompt without {{data}} gets the data after it : a model can not explain numbers it is not given. Show the prompt of API Maker shows the prompt API Maker writes, and Start my own prompt from it copies it into the field.

instructions added to the prompt of API Maker
Mention the payment APIs first.
Compare with the targets of our SLA : 99.9 % success, p95 under 800 ms.
Say which team owns each API : /orders is the shop team, /pay the payments team.

Vulnerability Report

A Vulnerability Report watches the packages your code uses : the packages of your sandboxes, of every language, and the crates API Maker itself is built from. It reads the same audit as the Vulnerabilities page. You open it from that page too : its AI Report button shows your Vulnerability Reports, or starts a new one when you have none.

flowchart LR
    A[Schedule] --> B[Audit the packages]
    B --> C[Give each vulnerable package a level]
    C --> D{Changed since the last mail?}
    D -- no --> E[History : nothing changed]
    D -- yes --> F[Ask the AI model]
    F --> G[Mail : what changed, what to fix, the analysis]

What it looks at

Setting What it does
The packages of the sandboxes Every language your sandboxes use. You fix them in Sandbox settings.
The crates of the server What API Maker is built from. An update of API Maker fixes them. On by default for the root user.
Languages Only some languages of the sandboxes. Empty : every language.
Whose sandboxes The root user : every admin, or one admin. An admin : its own sandboxes.
Rows of the list How many vulnerable packages the mail and the model see, the worst first. 3 to 50.

An audit of the last hour is used again, so a run takes a few seconds.

What each severity means

Every advisory has a severity. A package takes the severity of its worst advisory. You choose what each severity means for the report :

Severity Default
Critical Critical a critical problem
High Warning a problem to fix
Moderate Warning a problem to fix
Low Just list it shown in the mail, but sends no mail by itself

A more severe advisory can never count less than a milder one. Two switches more :

  • Leave out development packages (on) : packages only used to build and test never run in production.
  • Count packages with no fix yet (on) : off, a package without a safe version is only listed, as you can not update it yet.

When the mail goes

Choice The mail goes
Only when something changes (the default) when a package becomes vulnerable, gets a new advisory, a worse or milder severity, or a fix is published. No mail when nothing changed.
Every time it runs on every run, even when nothing changed since the last mail. With a daily schedule, that is one mail a day.
  • The first run sends a mail when it finds packages to fix.
  • Say when vulnerabilities are fixed (on) : a mail when packages told before have no known problem any more.
  • Run now always sends a mail, and it becomes the mail the next runs compare with.
  • A part which could not be checked this time (a registry did not answer) changes nothing : its packages are neither new nor fixed.

The mail

Four numbers (the vulnerable packages, the critical ones, the high ones, the ones a version fixes), then Since the last mail : the New, Updated and Fixed packages. Then what the AI says, and Packages to fix : each package with its severity, its first advisory, the version which fixes it and how (Set lodash to 4.18.1 in Sandbox settings, Comes with an update of API Maker, Held back by …). The model writes a Summary, Fix first, What changed, Can wait and Recommendations.

Tokens and cost before it runs

The bottom of the editor estimates a run as you write it : the tokens the model reads, the most it may write, the cost of a run at the prices of the model, and the cost of a month of the schedule.

≈ 3.4k tokens in · up to 8k out · $0.0013 to $0.02 a run · 720 runs a month at most · $0.94 to $12.19

The month is the most it could cost : a report which mails on problems only asks the model only when a check finds one. Every mail ends with what its run cost, and the AI calls say the real numbers.

Preview makes the mail with the numbers and the checks, and costs no token. Preview with AI asks the model too. Neither sends anything : send a preview from its window when you like it.

Run now

Run now on a report runs it at once and sends its mail, whatever its checks say. Pause keeps the report without its schedule.

The AI Report of Analytics

The Analytics page has an AI Report button. It asks the model about the time range the page shows, and the admin the root user picked. Choose a model, a depth (Quick, or Every API) and a language. The report shows in the window : send it by mail from there, or press Schedule it to make a report of it.

The tabs of the page

Reports

Every report is a tile : its type, its last verdict, when it runs next, who it mails and when, its model, and how its last run went. All, System Health and Vulnerability above the tiles show the reports of one type.

History

Every run of every report : when, the verdict, whether a mail went, the model, its tokens and its cost, and what started it. Filter by report, verdict, mail and start. A row opens on its numbers and its checks. See the mail shows the mail as it was made, and Send again sends it to the addresses you write.

Token usage

The calls, the tokens read and written, and the cost of a period : by day, by purpose (reports, previews, tests, Analytics), by model and by report. The root user also sees the calls admins made with its keys.

AI calls

Every call to a provider. Filter by period, provider, purpose, status and key, or search the errors, models and reports. A row opens on its tokens, the estimate beside them, the prices, the model which answered, the tries and the error. Load more reads older calls. The clock sets how long calls and runs are kept : 90 days by default.

What is saved

What Where
The reports am_ai_report_schedules of the main database.
The runs, with their mails am_ai_reports of the database of the logs (or the main database).
The calls to the providers am_ai_calls, same place.
How long they are kept am_ai_settings of the main database.

None of them is part of git : reports belong to an installation, as its backups do.

Mail is not set up yet ?

The mails go out through Outgoing Email (SMTP) : the server of the root user for its reports, and for an admin the server it chose (the root user's, when the root user lets it, or its own). Until one is set up, reports still run : read them in the History, which says why the mail did not go.