Skip to content

Commit 0a1416c

Browse files
committed
Update README
Signed-off-by: Markus Blaschke <[email protected]>
1 parent 203db88 commit 0a1416c

1 file changed

Lines changed: 43 additions & 33 deletions

File tree

README.md

Lines changed: 43 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -10,40 +10,50 @@ Prometheus exporter for Azure DevOps (VSTS) for projects, builds, build times (e
1010
Configuration
1111
-------------
1212

13-
Normally no configuration is needed but can be customized using environment variables.
14-
15-
| Environment variable | DefaultValue | Description |
16-
|---------------------------------------|-------------------------------------|--------------------------------------------------------------------------|
17-
| `SCRAPE_TIME` | `30m` | Interval (time.Duration) between API calls |
18-
| `SCRAPE_TIME_PROJECTS` | not set, default see `SCRAPE_TIME` | Interval for project metrics (list of projects for all scrapers) |
19-
| `SCRAPE_TIME_REPOSITORY` | not set, default see `SCRAPE_TIME` | Interval for repository metrics |
20-
| `SCRAPE_TIME_BUILD` | not set, default see `SCRAPE_TIME` | Interval for build metrics |
21-
| `SCRAPE_TIME_RELEASE` | not set, default see `SCRAPE_TIME` | Interval for release metrics |
22-
| `SCRAPE_TIME_DEPLOYMENT` | not set, default see `SCRAPE_TIME` | Interval for deployment metrics |
23-
| `SCRAPE_TIME_PULLREQUEST` | not set, default see `SCRAPE_TIME` | Interval for pullrequest metrics |
24-
| `SCRAPE_TIME_STATS` | not set, default see `SCRAPE_TIME` | Interval for stats metrics |
25-
| `SCRAPE_TIME_RESOURCEUSAGE` | not set, default see `SCRAPE_TIME` | Interval for resourceusage metrics |
26-
| `SCRAPE_TIME_LIVE` | `30s` | Time (time.Duration) between API calls |
27-
| `SERVER_BIND` | `:8080` | IP/Port binding |
28-
| `AZURE_DEVOPS_URL` | none | Azure DevOps url (only if on-prem) |
29-
| `AZURE_DEVOPS_ORGANISATION` | none | Azure DevOps organisation (subdomain, if hosted by microsoft) |
30-
| `AZURE_DEVOPS_ACCESS_TOKEN` | none | Azure DevOps access token |
31-
| `AZURE_DEVOPS_FILTER_PROJECT` | none | Whitelist project uuids |
32-
| `AZURE_DEVOPS_BLACKLIST_PROJECT` | none | Blacklist project uuids |
33-
| `AZURE_DEVOPS_FILTER_AGENTPOOL` | none | Whitelist for agentpool metrics |
34-
| `AZURE_DEVOPS_QUERIES` | none | Whitelist query and project uuids |
35-
| `AZURE_DEVOPS_APIVERSION` | fixed version | API version used to query for Azure DevOps |
36-
| `REQUEST_CONCURRENCY` | `10` | API request concurrency (number of calls at the same time) |
37-
| `REQUEST_RETRIES` | `3` | API request retries in case of failure |
38-
| `LIMIT_BUILDS_PER_PROJECT` | `100` | Fetched builds per project |
39-
| `LIMIT_BUILDS_PER_DEFINITION` | `10` | Fetched builds per definition |
40-
| `LIMIT_RELEASES_PER_PROJECT` | `100` | Fetched releases per project |
41-
| `LIMIT_RELEASES_PER_DEFINITION` | `100` | Fetched releases per definition |
42-
| `LIMIT_DEPLOYMENTS_PER_DEFINITION` | `100` | Fetched deployments per definition |
43-
| `LIMIT_RELEASEDEFINITION_PER_PROJECT` | `100` | Fetched builds per definition |
44-
| `LIMIT_BUILD_HISTORY_DURATION` | `48h` | Time (time.Duration) how long the exporter should look back for builds |
45-
| `LIMIT_RELEASE_HISTORY_DURATION` | `48h` | Time (time.Duration) how long the exporter should look back for releases |
13+
```
14+
Usage:
15+
azure-devops-exporter [OPTIONS]
16+
17+
Application Options:
18+
--debug debug mode [$DEBUG]
19+
-v, --verbose verbose mode [$VERBOSE]
20+
--log.json Switch log output to json format [$LOG_JSON]
21+
--scrape.time= Default scrape time (time.duration) (default: 30m) [$SCRAPE_TIME]
22+
--scrape.time.projects= Scrape time for project metrics (time.duration) [$SCRAPE_TIME_PROJECTS]
23+
--scrape.time.repository= Scrape time for repository metrics (time.duration) [$SCRAPE_TIME_REPOSITORY]
24+
--scrape.time.build= Scrape time for build metrics (time.duration) [$SCRAPE_TIME_BUILD]
25+
--scrape.time.release= Scrape time for release metrics (time.duration) [$SCRAPE_TIME_RELEASE]
26+
--scrape.time.deployment= Scrape time for deployment metrics (time.duration) [$SCRAPE_TIME_DEPLOYMENT]
27+
--scrape.time.pullrequest= Scrape time for pullrequest metrics (time.duration) [$SCRAPE_TIME_PULLREQUEST]
28+
--scrape.time.stats= Scrape time for stats metrics (time.duration) [$SCRAPE_TIME_STATS]
29+
--scrape.time.resourceusage= Scrape time for resourceusage metrics (time.duration) [$SCRAPE_TIME_RESOURCEUSAGE]
30+
--scrape.time.query= Scrape time for query results (time.duration) [$SCRAPE_TIME_QUERY]
31+
--scrape.time.live= Scrape time for live metrics (time.duration) (default: 30s) [$SCRAPE_TIME_LIVE]
32+
--stats.summary.maxage= Stats Summary metrics max age (time.duration) [$STATS_SUMMARY_MAX_AGE]
33+
--azuredevops.url= Azure DevOps url (empty if hosted by microsoft) [$AZURE_DEVOPS_URL]
34+
--azuredevops.access-token= Azure DevOps access token [$AZURE_DEVOPS_ACCESS_TOKEN]
35+
--azuredevops.organisation= Azure DevOps organization [$AZURE_DEVOPS_ORGANISATION]
36+
--azuredevops.apiversion= Azure DevOps API version (default: 5.1) [$AZURE_DEVOPS_APIVERSION]
37+
--whitelist.project= Filter projects (UUIDs) [$AZURE_DEVOPS_FILTER_PROJECT]
38+
--blacklist.project= Filter projects (UUIDs) [$AZURE_DEVOPS_BLACKLIST_PROJECT]
39+
--whitelist.agentpool= Filter of agent pool (IDs) [$AZURE_DEVOPS_FILTER_AGENTPOOL]
40+
--list.query= Pairs of query and project UUIDs in the form: '<queryId>@<projectId>' [$AZURE_DEVOPS_QUERIES]
41+
--request.concurrency= Number of concurrent requests against dev.azure.com (default: 10) [$REQUEST_CONCURRENCY]
42+
--request.retries= Number of retried requests against dev.azure.com (default: 3) [$REQUEST_RETRIES]
43+
--limit.builds-per-project= Limit builds per project (default: 100) [$LIMIT_BUILDS_PER_PROJECT]
44+
--limit.builds-per-definition= Limit builds per definition (default: 10) [$LIMIT_BUILDS_PER_DEFINITION]
45+
--limit.releases-per-project= Limit releases per project (default: 100) [$LIMIT_RELEASES_PER_PROJECT]
46+
--limit.releases-per-definition= Limit releases per definition (default: 100) [$LIMIT_RELEASES_PER_DEFINITION]
47+
--limit.deployments-per-definition= Limit deployments per definition (default: 100) [$LIMIT_DEPLOYMENTS_PER_DEFINITION]
48+
--limit.releasedefinitions-per-project= Limit builds per definition (default: 100) [$LIMIT_RELEASEDEFINITION_PER_PROJECT]
49+
--limit.build-history-duration= Time (time.Duration) how long the exporter should look back for builds (default: 48h) [$LIMIT_BUILD_HISTORY_DURATION]
50+
--limit.release-history-duration= Time (time.Duration) how long the exporter should look back for releases (default: 48h) [$LIMIT_RELEASE_HISTORY_DURATION]
51+
--bind= Server address (default: :8080) [$SERVER_BIND]
4652
53+
Help Options:
54+
-h, --help Show this help message
55+
56+
```
4757

4858
Metrics
4959
-------

0 commit comments

Comments
 (0)