Skip to content
Luna
Esc
↑↓navigate↵open⌘Jpreview
On this page

Check status

See an environment's luna types at a glance, or one type in full, with its calls, errors, latency and cost.

Once an app is live, you need to know whether its calls succeed, how long they take and which luna types are busy. luna status answers that for an environment in one command, without opening a dashboard.

See every luna type at a glance

In your app’s folder, run luna status.

luna status

The first lines name the environment, its URL, the version of the code it runs and when its next scheduled wake-up is due. If the app serves HTTP routes, their address is there too.

Below them is a line for each luna type over the last hour.

Column Shows
Type The luna type’s name
Language TypeScript or Python
Access public or private
Awake Lunas of the type awake now
Calls and Errors Calls the type took, and how many failed with their share
p50 and p99 The median and the 99th percentile time a call took
Cost What the type cost in the window

A last row adds up the environment. An environment with indexes lists them in a table of their own, under the luna types.

Look at one luna type

Name a luna type to see it in full.

luna status List

The top part describes the type as deployed: the URL its lunas answer at, its handlers, schedules, streams, and the memory and CPU each luna may use. It also says how many lunas are awake now and the most that were awake in the window.

The next part covers the window: calls, errors, latency, busy time, wake-ups, connections opened and closed, and dead letters. Dead letters are messages that failed every attempt. It ends with the cost and the meters the type used most.

Two tables follow. The first gives each handler’s calls, errors and latency, including handlers nobody called. The second lists up to 10 of the busiest lunas by key. Metrics your own code records with OpenTelemetry appear last, as Follow traces shows.

Name an index instead of a luna type to see that index in full.

Change the window

The numbers cover the last hour unless you pass --since. It takes a length such as 90s, 15m, 2h or 3d.

luna status List --since 3d

Usage is kept by the hour, so costs cover whole hours. A window that starts inside an hour is priced from the start of that hour, and luna status says so under the table.

Pick the environment or tenant

luna status reads the project and environment from the folder’s .env.local or .env. Without either, it uses the production environment.

Option Does
--env Shows another environment of the project
--project Shows another project, by name or as organisation/project
--tenant Shows a tenant added to the environment, by its name
--dir Reads the env file of another folder
luna status --env staging --tenant acme

Read the numbers as JSON

Pass --json to get what Luna answered, for a script or an agent.

luna status --json

The object has these fields.

Field Holds
environment The environment’s name
tenant Its URL, version and the luna types its code defines, or null when nothing is deployed
metrics Each luna type’s numbers over the window
usage Each luna type’s usage and cost, or null when you may not read usage
indexes Each index with its numbers, when no luna type is named

Next steps

  • Read logs shows what a failing handler wrote.
  • Follow traces shows where a slow call spent its time.
  • Track usage breaks the cost down by environment, type and luna.

Was this page helpful?