0

I'm trying to check the state of a container in an azure container group using python.

The reason for this is, we have a monitor that check our application status and restarts the container-group if the application stops responding. The problem with this is, if the container takes too long to start up we don't want the monitor to restart it again.

So we would like to check if the container is currently in a waiting or pending state so that the monitor can ignore it until it comes up.

Illegal Operator
  • 656
  • 6
  • 14

1 Answers1

-1

I would recommend to use Readiness probe which supports for Azure Container Instance and Kubernetes as well. The readiness probe behaves like a Kubernetes readiness probe.

Readiness probe is meant to solve issues where dependency or startup of container takes time.

For example, a container app might need to load a large data set during startup, and you don't want it to receive requests during this time.

Refer to article which shows how to configure Readiness probe in ACI https://learn.microsoft.com/en-us/azure/container-instances/container-instances-readiness-probe

Raju Rh
  • 127
  • 1
  • 9
  • The readiness probe won't solve my problem, my problem is that the monitor tool we are using to monitor the application can't tell what the container state is – Illegal Operator Jul 06 '20 at 12:48