azure-devops-exporter
azure-devops-exporter copied to clipboard
Build and Install instructions
How is this built and installed?
Why is there no binary in the releases?
There is a docker image available: https://hub.docker.com/r/webdevops/azure-devops-exporter/ The image is using googles distroless container and the application is static build.. you could also copy the binary and run it on linux amd64
Hi @mblaschke im having the same question? i am so confused about the installation and configuration of this metric container. It would be great that the readme file could be updated to include some detailed install instruction and how to connect to Prometheus :)
I have built the container with this command in PowerShell
docker run -e AZURE_DEVOPS_URL=https://dev.azure.com/company -e AZURE_DEVOPS_ACCESS_TOKEN=pat -e AZURE_DEVOPS_ORGANISATION=company -e AZURE_DEVOPS_APIVERSION=6.0 --rm webdevops/azure-devops-exporter
But it doesn't generate the URL that I can use to connect to Prometheus?? So how can i configure this to connect to Prometheus to scrape metrics?
Thanks
@ngeegoh pass -p 8080:8080 to your above command and try to access the with this port ex : http://localhost:8080/metrics it took some time to figure it out
Below is prometheous config
- job_name: azure-devops-exporter-local
honor_timestamps: true
scrape_interval: 1m
scrape_timeout: 10s
metrics_path: /metrics
scheme: http
static_configs:
- targets:
:8080
- targets:
This is the Powershell script I use to build locally
$PROJECT_NAME = 'azure-devops-exporter'
$GIT_TAG = $(git describe --dirty --tags --always)
$GIT_COMMIT = $(git rev-parse --short HEAD)
if ($PSVersionTable.Platform -eq 'Win32NT') {
$OUTPUT_EXE="${PROJECT_NAME}.exe"
} else {
$OUTPUT_EXE="${PROJECT_NAME}"
}
$env:CGO_ENABLED = 0
go build -a -ldflags '-X "main.gitTag=${GIT_TAG}" -X "main.gitCommit=${GIT_COMMIT}" -extldflags "-static"' -o ${PROJECT_NAME}.exe .