რედაქტირება

გაზიარება არხიდან:


Create a service hook for Azure DevOps with Grafana

Azure DevOps Services | Azure DevOps Server 2022 - Azure DevOps Server 2019

Grafana is an open source, feature-rich metrics dashboard and graph editor. It supports Graphite, Elasticsearch, OpenTSDB, Prometheus, and InfluxDB analytics services. Use the Grafana service hook to annotate Grafana dashboards upon completion of Azure Pipelines deployments.

Grafana dashboard with annotations

Note

The service hook for Grafana is supported for Azure DevOps Server 2019.1 and later versions.

Create a service hook subscription

  1. Navigate to project settings:

    https://dev.azure.com/{orgName}/{project_name}/_settings/serviceHooks

    Project settings page

    Select Create Subscription.

  2. Choose Grafana among the list of services and choose Next

    New Service Hooks Subscription dialog, choose Grafana

  3. For Release deployment completed event, configure the optional filters: Release pipeline name, Stage name, and Status

    Configure release deployment completed filters

  4. Provide the Grafana URL and Grafana API token required for Azure DevOps to post annotations.

    • If you check the Annotate deployment duration window, the annotation added corresponds to the duration of the deployment (start and end timestamps of deployment).
    • If not checked, annotation corresponds to only the completion timestamp of the deployment. The dashboard input can be used to choose a specific dashboard as the target of annotations rather than the default behavior of annotating all dashboards.
  5. Choose Test to verify that Azure DevOps can use the provided configuration and successfully create a subscription.

  6. Once verified, choose Finish to complete the creation of subscription.

    Annotation settings