App Metrics
Monitor aggregate resource usage and instance counts across your entire application. These metrics provide an overview of your app's resource consumption and scaling behavior.
Overview
App-level metrics allow you to track:
- CPU Usage: Monitor CPU consumption across all instances
- Instance Counts: Track running instances and peak usage
Usage
odin fleet metrics app <command>
Commands
CPU Metrics
cpu-instant
Get the current CPU usage for your app as an instant snapshot.
cpu-usage
Get CPU usage over a specified time range.
Flags:
--start=<number>: Unix timestamp for the start of the time range (required).--end=<number>: Unix timestamp for the end of the time range (required).
cpu-usage-per-day
Get daily aggregated CPU usage over a specified time range.
Flags:
--start=<number>: Unix timestamp for the start of the time range (required).--end=<number>: Unix timestamp for the end of the time range (required).
Instance Metrics
instances-instant
Get the current number of running instances.
instances-running
Get the number of running instances over a specified time range.
Flags:
--start=<number>: Unix timestamp for the start of the time range (required).--end=<number>: Unix timestamp for the end of the time range (required).
instances-peak
Get the peak instance count.
Examples
Get current CPU usage:
Get CPU usage for the last 7 days:
Get daily CPU usage breakdown:
Get metrics as JSON for programmatic usage:
Global Flags
The following flags can be used with any ODIN CLI command:
-
--api-key=<string>The API key to use for authentication. If omitted, the CLI will use the api-key stored in the configuration file on your system. Use odin login to store the API key for subsequent commands. -
--app-id=<string>The ID of the app to use for the command. If omitted, the CLI will use the currently selected app. Use odin apps select to select an app interactively. -
--format=<string>The output format to use for the command. Supported formats arejson,value,flattenedandtable. If omitted, the CLI will use the default format specified in the configuration file. Learn more about output formatting. -
--forceForces the command to execute without prompting for confirmation. Use with caution. -
--quietSuppresses all informational output except for errors. Useful for scripting and automation.