ms.subservice | ms.topic | title | description | ms.assetid | ms.author | author | monikerRange | ms.date |
---|---|---|---|---|---|---|---|---|
azure-devops-service-hooks |
conceptual |
Create a service hook for Grafana |
Annotate Grafana dashboards upon completion of deployments in Azure Pipelines |
d588f4a0-8081-4684-b87e-64d3140b8b1c |
vijayma |
vijayma |
>= azure-devops-2019 |
07/27/2020 |
[!INCLUDE version-gt-eq-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.
::: moniker range="azure-devops-2019"
Note
The service hook for Grafana is supported for Azure DevOps Server 2019.1 and later versions.
::: moniker-end
-
Navigate to project settings:
https://dev.azure.com/{orgName}/{project_name}/_settings/serviceHooks
Select Create Subscription.
-
Choose Grafana among the list of services and choose Next
:::image type="content" source="./media/grafana/choose-grafana.png" alt-text="New Service Hooks Subscription dialog, choose Grafana":::
-
For Release deployment completed event, configure the optional filters: Release pipeline name, Stage name, and Status
:::image type="content" source="./media/grafana/deployment-completed-filters.png" alt-text="Configure release deployment completed filters":::
-
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.
-
Choose Test to verify that Azure DevOps can use the provided configuration and successfully create a subscription.
-
Once verified, choose Finish to complete the creation of subscription.