Check Agent health status for Azure Environment Virtual Machine Resource that from an on-premise machine

Wei, Sterling S 20 Reputation points
2023-10-09T15:01:01.2433333+00:00

I have an agent added through this process.
https://learn.microsoft.com/en-us/azure/devops/pipelines/process/environments-virtual-machines?view=azure-devops

The VM is from an on-premise machine, not an Azure VM.

Is there a way to monitor the status of the agent to see if it's still running?

Azure Monitor
Azure Monitor
An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
2,829 questions
{count} votes

Accepted answer
  1. AnuragSingh-MSFT 20,431 Reputation points
    2023-10-12T09:11:37.5366667+00:00

    Wei, Sterling S, Thank you for posting this question.

    Azure DevOps has its own community forum where Azure DevOps related questions and topics can be discussed - Azure DevOps Community

    However, from Azure Monitor standpoint, here are the options for your scenario which can be explored:

    I understand that the Azure DevOps Environment VM to which an on-prem VM is added gets installed with Azure Pipeline self-hosted agents. Azure DevOps has "Agent Get" API to get the status of the agents which can be checked regularly to get the status - refer to TaskAgent.Status for more details in the response. You can then use the following to track availability of agent from this API:
    TrackAvailability() in AppInsights - This enables custom URL ping test where the test conditions and authentication etc. can be managed in the code itself.

    If there are also some associated logs/perf counters/events etc. that you need to monitor of your VM, Azure Monitor's Azure Monitor Agent can be used to track them and report/alert. However, this would require clear identification of the metrics/logs that can give some information.

    I would also suggest using the Azure DevOps Community forum for specialized discussion with respect to monitoring the VMs of Azure DevOps environment. If you have any questions related to Azure Monitor and its capability to meet specific requirement, please let us know.

    0 comments No comments

0 additional answers

Sort by: Most helpful