Azure DevOps is Microsoft's go-to tool for managing your DevOps workflow from tasks to CI/CDs and tests.
It has an enormous selection of out-of-the-box features and functionality.Unfortunately, there is no proper way to set up monitoring or analysis around your Azure DevOps organisation.
One way to monitor Azure DevOps is to create custom dashboards for it using the widgets (https://docs.microsoft.com/en-us/azure/devops/report/dashboards/overview?view=azure-devops) - this is a good solution but the widget are limited and some of the most valuable informations are accessible only trough the APIs.
To enhance the monitoring capabilities of Azure DevOps, I tried to place Grafana on top of it. Grafana is a well-known visualization tool, it's openSource and it's got hundreds of features ... also, it does some nice kick dashboards.
- Grafana installed somewhere as PaaS or on a VM.
- Connectivity from Grafana to Azure DevOps.
- A User with read access to Azure DevOps.
- Install the "infinity" plugin for Grafana. (https://grafana.com/grafana/plugins/yesoreyeram-infinity-datasource/)
We are going to use the infinity plugin for Grafana, this plugin allow us to scrape any API endpoint and manipulate data using JSON or UQL language, quite powerful.
The PAT requires read only access to all the resources on Azure DevOps
use the PAT as password
it's now possible to scrape any AzureDevOps API url in your org and retrieve any kind of info that you might require. This is the reference to the AzureDevOps API docs (https://docs.microsoft.com/en-us/rest/api/azure/devops/?view=azure-devops-rest-7.1)
you can find an example json file in this repo - search for dashboard_template.json (replace the "SUB_ID" with your subscription ID)
For example:
Get details about the executed tests
Insights about the waiting times in the queue and agent pools which they wait the most.
Insights about the execution times and agent pools which they have the bigger execution time.
hopefully this can help you in kickstart your AzureDevOps monitoring and create even more complex dashboards :) Thank you!