Server Metrics
Monitor individual server performance including CPU usage, memory consumption, disk I/O, and network traffic. These metrics help you understand resource utilization at the server level.
Overview
Server-level metrics allow you to track:
- CPU Usage: Monitor CPU consumption for a specific server
- Memory Usage: Track memory utilization over time
- Disk I/O: Monitor disk read and write operations
- Network Traffic: Track ingress (incoming) and egress (outgoing) network traffic
All server metrics commands support interactive server selection when --server-id is omitted.
Usage
odin fleet metrics server <command> --server-id=SERVER_ID --start=TIMESTAMP --end=TIMESTAMP
Common Flags
All server metrics commands share these flags:
--server-id=<number>: The ID of the server to query metrics for. If omitted, you'll be prompted to select from available servers interactively.--start=<number>: Unix timestamp for the start of the time range (required).--end=<number>: Unix timestamp for the end of the time range (required).
Commands
CPU
Get CPU usage for a specific server over a time range.
Memory
Get memory usage for a specific server over a time range.
Disk Read
Get disk read metrics for a specific server over a time range.
Disk Write
Get disk write metrics for a specific server over a time range.
Network Ingress
Get incoming network traffic metrics for a specific server over a time range.
Network Egress
Get outgoing network traffic metrics for a specific server over a time range.
Examples
Get CPU usage for server 123 over the last 24 hours:
Get memory usage with interactive server selection:
Get disk I/O metrics for a server:
Get network traffic as JSON:
Monitor all key metrics for a server in a script:
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.