Skip to content

How to get indepth insight about Azure DevOps using Grafana

License

Notifications You must be signed in to change notification settings

alessiofilippin/Monitor-AzureDevOps-with-Grafana

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Monitor-AzureDevOps-with-Grafana

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.

Solution?

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.

Requirments

  1. Grafana installed somewhere as PaaS or on a VM.
  2. Connectivity from Grafana to Azure DevOps.
  3. A User with read access to Azure DevOps.
  4. 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.

STEPS

1) Install Infinity plugin on Grafana

image

image

2) Create a PAT for the Azure DevOps user / SP

The PAT requires read only access to all the resources on Azure DevOps

image

3) Create an infinity datasource using the user's PAT as auth method

use the PAT as password

image

4) Create your dashboards!

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

Capture1

Insights about the waiting times in the queue and agent pools which they wait the most.

Capture2

Insights about the execution times and agent pools which they have the bigger execution time.

Capture3

hopefully this can help you in kickstart your AzureDevOps monitoring and create even more complex dashboards :) Thank you!

About

How to get indepth insight about Azure DevOps using Grafana

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published