Jerry Joyce
Jerry Joyce

Reputation: 351

Can I Get logs for previous instance of restarted Azure Container Instance container?

I have a container group running 2 containers. One of the containers is restarting pretty consistently. I suspect that it may be hitting its memory limit but I can't find anything in the logs to confirm this. Is there a way to get to the previous logs for the container or find out if the container orchestrator terminated my container due to OOM?

Upvotes: 3

Views: 2245

Answers (2)

Wout
Wout

Reputation: 107

You can send your ACI's logs to a Log Analytics workspace, and then analyse the error. The only other way I see is keep clicking the refresh button while looking at the logs in the Azure Portal, and you will see your memory error for some seconds before the container restarts..

Upvotes: 2

smichel
smichel

Reputation: 765

Once a container died, everything is lost by nature. Either you connect to an external device where you are persisting/mounting the logs to or you could install the log-analytics-containers from the marketplace. Retrace could also be an option.

Upvotes: 1

Related Questions