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 logs

If 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=5m

If 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 -f

If 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>&1


How to inspect logs of Astra Proxy Service?

Note that the following command gives full logs of selected service.

./astra-cli proxy logs

If 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=5m

If 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 -f

If 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