How to inspect logs using astra-cli
Last updated: August 18, 2025
Overview
In this article we will see how we can effectively use Astra-Cli to inspect the logs of Astra Traffic Collector and Astra Proxy service
To know how to download the Astra-Cli and setup the Astra Proxy Service and Astra Traffic Collector, please refer to the below article
📄 How to Setup Astra Proxy Service Integration using astra-cli
How to inspect logs of Astra Traffic Collector?
Note that the following command gives full logs of selected service.
./astra-cli collector logsIf you need most recent logs, say last 5 minutes, you can use a small variant of the command by passing in a flag
./astra-cli collector logs --since=5mIf you need most recent logs, say last 1 hour, you can use a small variant of the command by passing in a flag
./astra-cli collector logs --since=1h
If you want to tail the logs, then you can use this command
./astra-cli collector logs --tail=0 -fIf you want to redirect the logs to a file for further inspection, you can use this command
./astra-cli collector logs --since=1h > collector.log 2>&1How to inspect logs of Astra Proxy Service?
Note that the following command gives full logs of selected service.
./astra-cli proxy logsIf you need most recent logs, say last 5 minutes, you can use a small variant of the command by passing in a flag
./astra-cli proxy logs --since=5mIf you need most recent logs, say last 1 hour, you can use a small variant of the command by passing in a flag
./astra-cli proxy logs --since=1h
If you want to tail the logs, then you can use this command
./astra-cli proxy logs --tail=0 -fIf you want to redirect the logs to a file for further inspection, you can use this command
./astra-cli proxy logs --since=1h > collector.log 2>&1