Skip to main content

Azure DevOps integrated with Grafana – Proof of Concept

Performed on date 16-Aug to 19-Aug, 2022

Summary

Integrate Azure DevOps with Kibana/Grafana to send events via Azure DevOps. Ex A push notification when a build fails

Note: As no Service hook is listed for Kibana specifically in Azure DevOps currently, the listed Service hook for Grafana is explored for Kibana integration. More details in this link

Concept

Steps to create Azure DevOps - Kibana Integration

  • Accessible Azure DevOps Subscription (SaaS)
  • Configured Elasticsearch and Kibana v7.16.2 (IaaS) on RHEL 7 x86-64 hosts
  • Create API token in Kibana to be used in Azure DevOps Service Hooks
  • Refer This Link on how to create Kibana API token
  • Login Azure DevOps Project
  • Select Project - Project Settings - Service Hooks - Grafana - Enter below details
    • Kibana URL Endpoint
    • API Token
    • Tags
    • Dashboard
    • Save

Since the Kibana used in this integration is open-source with Basic Licensing, not allowing to generate OAuth API token for cross-platform integration such as the one with Azure DevOps. So its Known Error with this license, Reference message below

Steps to create Azure DevOps – Grafana Integration

  • Accessible Azure DevOps Subscription (SaaS)
  • Configured Grafana (IaaS) on RHEL 7 x86-64 hosts
  • Create API token in Grafana to be used in Azure DevOps Service Hooks
  • Refer This Link on how to create Grafana API token
  • Login Azure DevOps Project
  • Select Project - Project Settings - Service Hooks - Grafana - Enter below details
    • Grafana URL Endpoint
    • API Token
    • Tags
    • Dashboard
    • Save

Grafana details into Azure DevOps Grafana Service Hook page

Once above Service Hook is created successfully, below lands up

Successfully created Grafana Service Hook listed below

Now, Azure DevOps can push event notifications into Grafana over this Service Hook

Reference Links

Azure DevOps Service Hooks

https://docs.microsoft.com/en-us/azure/devops/service-hooks/overview?view=azure-devops

Kibana API Token Creation

https://www.elastic.co/guide/en/kibana/7.16/api-keys.html

Grafana API Token Creation

https://grafana.com/docs/grafana/v7.5/http_api/create-api-tokens-for-org/#api-tutorial-how-to-create-api-tokens-and-dashboards-for-a-specific-organization

Let’s engage