Enaable elaaastic moonitoring for azure devops agents
How we enable elastic montioring for windows self hosted agents in azure devops.
Please suggest
Azure DevOps
-
Anurag Rohikar • 3,190 Reputation points • Microsoft External Staff • Moderator
2025-09-22T10:04:50.7533333+00:00 Hello tarun k,
To better understand your scenario and suggest the right approach, could you clarify a few points for us?
- When you say “elastic monitoring,” are you referring to:
- Elastic Stack / Elastic APM (Elasticsearch, Logstash, Kibana)?
- Azure Monitor / Log Analytics?
- Or elastic scaling (auto-scaling) of Azure DevOps agents?
- Are you trying to monitor the agents themselves (CPU, memory, queue times, availability) or the applications they build and deploy?
- How are your Windows self-hosted agents deployed dedicated VMs, containers, or scale sets?
- Are these agents running as a Windows service or in interactive mode?
- Do you already have any monitoring tools or infrastructure (e.g., Elastic cluster, Azure Monitor workspace) in place?
- When you say “elastic monitoring,” are you referring to:
-
tarun k • 635 Reputation points
2025-09-22T10:07:11.34+00:00 Hi Anurag, can you respond in private and i got follow up questions
-
Anurag Rohikar • 3,190 Reputation points • Microsoft External Staff • Moderator
2025-09-22T13:31:37.7666667+00:00 Hello tarun k, I have messaged you in private please do let us know the further follow up questions.
-
Anurag Rohikar • 3,190 Reputation points • Microsoft External Staff • Moderator
2025-09-23T09:50:34.63+00:00 Hello tarun k,
Thanks for clarifying in private! To make sure we guide you correctly on enabling Elastic monitoring for your Windows servers and deployments, could you confirm a few details:
- Do you already have an Elastic Stack (Elasticsearch/Kibana) cluster deployed, or do you need guidance on setting that up as well?
- Are you looking to capture server performance metrics, Liquibase execution logs, or custom APM traces from the deployments?
- Will Liquibase be running directly on the Azure DevOps agent machines, or on separate servers triggered by the agents?
- Do you want agent-level observability only (e.g., Metricbeat/Winlogbeat), or full application performance monitoring (Elastic APM for Java, if Liquibase is using Java)?
Once we have this info, we can share a step-by-step guide or recommended Beats/Agent configuration tailored to your setup.
Thanks for your patience while we narrow this down!
-
Anurag Rohikar • 3,190 Reputation points • Microsoft External Staff • Moderator
2025-09-26T10:00:30.6566667+00:00 Hello tarun k, Thanks for the details that helps a lot! Since you don’t yet have an Elastic Stack deployed and you’d like to monitor server performance, LB execution logs, and full APM traces, here’s the recommended approach:
- Deploy an Elastic Stack (Elasticsearch + Kibana)
- Option A – Elastic Cloud (Recommended):
- Sign up at Elastic Cloud
- Create a new deployment (it provisions Elasticsearch and Kibana automatically).
- Note the Elasticsearch endpoint and Cloud ID you’ll use these for agent configuration.
- Option B – Self-Hosted:
- If you prefer on-prem or VM-based, install Elasticsearch and Kibana on Windows or Linux VMs.
- Ensure network access from your Azure DevOps agents to the Elasticsearch server on ports 9200 (Elasticsearch) and 5601 (Kibana).
- Note: For detailed instructions on deploying Elasticsearch on Azure VMs, refer to the Microsoft documentation
- Install Elastic Agent on Each Windows Self-Hosted Agent
- Download Elastic Agent: Elastic Agent Windows Install
- Run PowerShell as Administrator and install:
.\elastic-agent install --url=https://<Elastic-Stack-URL>:8220 --enrollment-token=<TokenFromElasticCloud> - Enroll each agent in Fleet to manage integrations centrally.
- Enable System Metrics and Windows Logs
- In Kibana → Fleet → Integrations, add:
- System (CPU, memory, disk, network metrics).
- Windows (event logs, service monitoring).
- Enable Elastic APM for Liquibase
- If Liquibase runs with Java:
- Download Elastic APM Java Agent .
- Add the agent to the Liquibase JVM startup command, e.g.:
java -javaagent:/path/to/elastic-apm-agent.jar \ -Delastic.apm.server_urls=https://<Elastic-Stack-URL>:8200 \ -Delastic.apm.service_name=Liquibase \ -Delastic.apm.secret_token=<YourToken> \ -jar liquibase.jar <your-args> - This sends traces for database change sets and execution times directly to Elasticsearch.
- Visualize and Set Alerts
- Use Kibana Dashboards to view:
- Server performance (CPU, memory, queue times).
- Liquibase deployment traces and logs.
- Configure Kibana Alerts to notify you when deployments fail or exceed thresholds.
- (Optional) Secure and Scale
- Add role-based access control in Kibana for your team.
- If using Elastic Cloud, enable snapshots for backup.
- Scale Elasticsearch nodes or upgrade your Elastic Cloud tier if your Liquibase logs grow quickly.
Documentation:
- Elastic Cloud: Get started
- Elastic Agent: Install Elastic Agent on Windows
- Java APM Agent: Elastic APM Java Agent setup
- Liquibase reference (for context): Liquibase Documentation
Disclaimer: This document is not maintained by Microsoft. It is being shared solely for your convenience.
I hope this helps. Thank you!
- Deploy an Elastic Stack (Elasticsearch + Kibana)
Sign in to comment