Sign inSign up

drewster727/azure-devops-exporter

By drewster727

•Updated over 7 years ago

Image
0

160

drewster727/azure-devops-exporter repository overview

⁠Azure DevOps Exporter (VSTS)

license Docker Docker Build Status

Prometheus exporter for Azure DevOps (VSTS) for projects, builds, build times (elapsed and queue wait time), agent pool utilization and active pull requests.

⁠Configuration

Normally no configuration is needed but can be customized using environment variables.

Environment variableDefaultValueDescription
SCRAPE_TIME30mInterval (time.Duration) between API calls
SCRAPE_TIME_PROJECTSnot set, default see SCRAPE_TIMEInterval for project metrics (list of projects for all scrapers)
SCRAPE_TIME_REPOSITORYnot set, default see SCRAPE_TIMEInterval for repository metrics
SCRAPE_TIME_BUILDnot set, default see SCRAPE_TIMEInterval for build metrics
SCRAPE_TIME_RELEASEnot set, default see SCRAPE_TIMEInterval for release metrics
SCRAPE_TIME_DEPLOYMENTnot set, default see SCRAPE_TIMEInterval for deployment metrics
SCRAPE_TIME_PULLREQUESTnot set, default see SCRAPE_TIMEInterval for pullrequest metrics
SCRAPE_TIME_LIVE30sTime (time.Duration) between API calls
SERVER_BIND:8080IP/Port binding
AZURE_DEVOPS_URLnoneAzure DevOps url (only if on-prem)
AZURE_DEVOPS_ORGANISATIONnoneAzure DevOps organisation (subdomain, if hosted by microsoft)
AZURE_DEVOPS_ACCESS_TOKENnoneAzure DevOps access token
AZURE_DEVOPS_FILTER_PROJECTnoneWhitelist project uuids
AZURE_DEVOPS_BLACKLIST_PROJECTnoneBlacklist project uuids
AZURE_DEVOPS_FILTER_AGENTPOOLnoneWhitelist for agentpool metrics
REQUEST_CONCURRENCY10API request concurrency (number of calls at the same time)
REQUEST_RETRIES3API request retries in case of failure
LIMIT_BUILDS_PER_DEFINITION10Fetched builds per definition
LIMIT_RELEASES_PER_DEFINITION100Fetched releases per definition
LIMIT_DEPLOYMENTS_PER_DEFINITION100Fetched deployments per definition
LIMIT_RELEASEDEFINITION_PER_PROJECT100Fetched builds per definition

⁠Metrics

MetricScraperDescription
azure_devops_statsliveGeneral scraper stats
azure_devops_agentpool_infoliveAgent Pool informations
azure_devops_agentpool_buildsliveCount of builds (by status)
azure_devops_agentpool_waitliveQueue wait time per agent pool (summary vector)
azure_devops_agentpool_sizeliveQueue size per agent pool
azure_devops_agentpool_agent_infoliveAgent information per agent pool
azure_devops_agentpool_agent_statusliveStatus informations (eg. created date) for each agent in a agent pool
azure_devops_agentpool_agent_jobliveCurrently running jobs on each agent
azure_devops_project_infolive/projectsProject informations
azure_devops_build_latest_infoliveLatest build information
azure_devops_build_latest_statusliveLatest build status informations
azure_devops_pullrequest_infopullrequestActive PullRequests
azure_devops_pullrequest_statuspullrequestStatus informations (eg. created date) for active PullRequests
azure_devops_pullrequest_labelpullrequestLabels set on active PullRequests
azure_devops_build_infobuildBuild informations
azure_devops_build_statusbuildBuild status infos (queued, started, finished time)
azure_devops_build_definition_infobuildBuild definition info
azure_devops_release_inforeleaseRelease informations
azure_devops_release_artifactreleaseRelease artifcact informations
azure_devops_release_environmentreleaseRelease environment list
azure_devops_release_environment_statusreleaseRelease environment status informations
azure_devops_release_approvalreleaseRelease environment approval list
azure_devops_release_definition_inforeleaseRelease definition info
azure_devops_release_definition_environmentreleaseRelease definition environment list
azure_devops_repository_inforepositoryRepository informations
azure_devops_repository_statsrepositoryRepository stats
azure_devops_repository_commitsrepositoryRepository commit counter
azure_devops_repository_pushesrepositoryRepository push counter
azure_devops_deployment_infodeploymentRelease deployment informations
azure_devops_deployment_statusdeploymentRelease deployment status informations

⁠Usage

Usage:
  azure-devops-exporter [OPTIONS]

Application Options:
  -v, --verbose                               Verbose mode [$VERBOSE]
      --bind=                                 Server address (default: :8080) [$SERVER_BIND]
      --scrape.time=                          Default scrape time (time.duration) (default: 30m) [$SCRAPE_TIME]
      --scrape.time.projects=                 Scrape time for project metrics (time.duration) [$SCRAPE_TIME_PROJECTS]
      --scrape.time.repository=               Scrape time for repository metrics (time.duration) [$SCRAPE_TIME_REPOSITORY]
      --scrape.time.build=                    Scrape time for build metrics (time.duration) [$SCRAPE_TIME_BUILD]
      --scrape.time.release=                  Scrape time for release metrics (time.duration) [$SCRAPE_TIME_RELEASE]
      --scrape.time.deployment=               Scrape time for deployment metrics (time.duration) [$SCRAPE_TIME_DEPLOYMENT]
      --scrape.time.pullrequest=              Scrape time for pullrequest metrics  (time.duration) [$SCRAPE_TIME_PULLREQUEST]
      --scrape.time.live=                     Scrape time for live metrics (time.duration) (default: 30s) [$SCRAPE_TIME_LIVE]
      --whitelist.project=                    Filter projects (UUIDs) [$AZURE_DEVOPS_FILTER_PROJECT]
      --blacklist.project=                    Filter projects (UUIDs) [$AZURE_DEVOPS_BLACKLIST_PROJECT]
      --whitelist.agentpool=                  Filter of agent pool (IDs) [$AZURE_DEVOPS_FILTER_AGENTPOOL]
      --azuredevops.access-token=             Azure DevOps access token [$AZURE_DEVOPS_ACCESS_TOKEN]
      --azuredevops.organisation=             Azure DevOps organization [$AZURE_DEVOPS_ORGANISATION]
      --request.concurrency=                  Number of concurrent requests against dev.azure.com (default: 10) [$REQUEST_CONCURRENCY]
      --request.retries=                      Number of retried requests against dev.azure.com (default: 3) [$REQUEST_RETRIES]
      --limit.builds-per-definition=          Limit builds per definition (default: 10) [$LIMIT_BUILDS_PER_DEFINITION]
      --limit.releases-per-definition=        Limit releases per definition (default: 100) [$LIMIT_RELEASES_PER_DEFINITION]
      --limit.deployments-per-definition=     Limit deployments per definition (default: 100) [$LIMIT_DEPLOYMENTS_PER_DEFINITION]
      --limit.releasedefinitions-per-project= Limit builds per definition (default: 100) [$LIMIT_RELEASEDEFINITION_PER_PROJECT]

Help Options:
  -h, --help                                  Show this help message

Tag summary

Content type

Image

Digest

Size

9.7 MB

Last updated

over 7 years ago

docker pull drewster727/azure-devops-exporter