Query Insights and monitoring

Monitoring

A short list of readings about a project, each with the moment it was read and where it comes from -- or not read, with the reason. There is no threshold, no colour and no alert: the reading and its age.

apg monitoring show --project-key KEY
ReadingUnitComes from
statetextthe newest usage sample
database sizebytesthe newest usage sample that read it
backup repository sizebytesthe newest usage sample that read it
your connectionscountthe newest usage sample that read it
requests in the last hourcountthe last hour's usage, counted across restarts
database time in the last hourmillisecondsthe last hour's usage, counted across restarts
backup statustextthe last backups reading
latest restore pointinstantthe last backups reading
last full backupinstantthe last backups reading
insights sampled atinstantthe newest Query Insights sample

The console's Monitoring view shows the same list.

Query Insights

Every five minutes the server samples the statements your database roles (customer_app, customer_admin) and your API's roles ran, from PostgreSQL's pg_stat_statements. The text is the one PostgreSQL normalised: a literal is a placeholder such as $1, never your value. For each statement over the window: calls, total and mean time, rows, rows per call, blocks read per call and the cache hit ratio, counted across restarts, the most time first.

apg insights show --project-key KEY --hours 24 --limit 20

Database time -- the time your statements spent executing -- is part of usage (apg usage show) and of the readings above.

Something here wrong or missing? Write to invite@agenticpostgresql.com.