> ## Documentation Index
> Fetch the complete documentation index at: https://docs.envzero.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Monitoring Self-Hosted Agents

> Monitor the health and version of env zero self-hosted Kubernetes agents, with active, inactive, and degraded status indicators for connectivity issues.

The [self-hosted agent](https://docs.envzero.com/guides/admin-guide/self-hosted-kubernetes-agent/overview.md) monitoring feature in env zero enables you to gain valuable insights into the current state of your agents, facilitating better control and management of your infrastructure as code processes.

## Monitoring Agents State

On the Agents page, you will find a comprehensive overview of all your self-hosted agents and their respective states. The states reflect the current operational status of each agent and provide valuable information about their behavior.

![Agents page listing all self-hosted agents with their current state (Active, Inactive, or Degraded) and version](https://mintcdn.com/envzero-b61043c8/NFoAIaj_CGEzw-yg/images/guides/admin-guide/self-hosted-kubernetes-agent/9dfa9a0-image.png?fit=max\&auto=format\&n=NFoAIaj_CGEzw-yg\&q=85\&s=6a0b5ac74e63074758a93ea383b66bc8)

The following agent states can be observed:

* `Active`: Indicates that the agent is functioning properly and is ready to execute deployment jobs.
  * Active agents are waiting for jobs to be assigned.
  * 11 minutes of activity will mark the agent as Active.
* `Inactive`: No agent has been detected.  The agent might not have been installed or not been able to reach env zero.
  * 11 minutes of inactivity will mark the agent as Inactive.
* `Degraded`: An agent that is able to poll env zero but not start jobs. The degraded state indicates that jobs are queueing up with no runners to execute them.
  * A job waiting in the queue for more than 5 minutes, while the agent runs no other job, triggers the degraded state.
  * Jobs waiting while the agent is running other jobs do not trigger the degraded state. The agent is at capacity, not unhealthy.

In addition, you can also track the versions of your self-hosted agents, By displaying the agent version you can ensure that you are using the latest features and patches provided by env zero.

> [!WARNING]
>
> Agent Version
>
> To view the agent versions, make sure you have [updated your agents](https://docs.envzero.com/guides/admin-guide/self-hosted-kubernetes-agent/self-hosted-kubernetes-agent.md#upgrade) to the `3.0.458` release or newer, which supports agent version monitoring. Keeping your agents up to date ensures compatibility with the latest features and optimizations offered by env zero.

## Next steps

* [Troubleshoot agent crashes](https://docs.envzero.com/guides/admin-guide/self-hosted-kubernetes-agent/troubleshooting.md)
* [Set up a failover agent](https://docs.envzero.com/guides/admin-guide/self-hosted-kubernetes-agent/hadr-strategy-for-self-hosted-agents.md) in case the primary cluster goes down


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.