astro deployment logs

The behavior and format of this command differs depending on what Astronomer product you’re using. Use the following tabs to change product contexts.

Show Airflow component logs over the last 24 hours for a given Deployment on Astro. These are the same logs that appear in the Logs tab of the Astro UI.

Usage

1astro deployment logs
When you filter logs using the command flags --error, --warn, --info, and --key-word, you can specify only one filter flag per command.

Options

OptionDescriptionPossible Values
<deployment-id>The ID of the Deployment to show logs forAny valid Deployment ID
-n, --deployment-nameThe name of the Deployment to show logs for. Use as an alternative to <deployment-id>.Any valid Deployment name
-e,--errorShow only logs with a log level of ERRORNone
-i,--infoShow only logs with a log level of INFONone
--keywordSearch the Deployment logs for a specific keyword or phrase.None
-c,--log-countThe number of log lines to show. The default is 500. The Astro CLI paginates the underlying API to return the full requested number of lines.Any integer. If you request a number of log lines that exceeds the total number of logs, then it shows all existing logs.
--componentShow logs from one or more components by name, passed as a repeatable flag or a comma-separated list. Use as an alternative to flags such as --scheduler or --triggerer.Any valid component name, for example scheduler or dag-processor
--dag-processorShow logs from the Dag processorNone
--schedulerShow logs from the schedulerNone
--triggererShow logs from the triggererNone
-w,--warnShow only logs with a log level of WARNINGNone
--webserverShow logs from the webserverNone
--workersShow logs from the workersNone
--workspace-idSpecify a Workspace to show logs for a Deployment outside of your current WorkspaceAny valid Workspace ID

Examples

1$ astro deployment logs
2# CLI prompts you for a Deployment to view logs for
3
4$ astro deployment logs cl03oiq7d80402nwn7fsl3dmv
5# View logs for a specific Deployment
6
7$ astro deployment logs --deployment-name="My Deployment" --error --log-count=25
8# Show only the last 25 error-level logs
9
10$ astro deployment logs cl03oiq7d80402nwn7fsl3dmv --dag-processor
11# Show Dag processor logs for a specific Deployment
12
13$ astro deployment logs cl03oiq7d80402nwn7fsl3dmv --component scheduler,dag-processor
14# Show logs from multiple components in a single command