From ca925ef66627737c095e29f30e0b71da42b2f808 Mon Sep 17 00:00:00 2001 From: Stanislav Date: Mon, 5 Nov 2018 06:20:00 +0300 Subject: [PATCH] Prometheus endpoint (#5256) * Add prometheus collector and route * dep ensure -add github.com/prometheus/client_golang/prometheus * dep ensure -update github.com/golang/protobuf * add metrics to reserved usernames * add comment head in metrics package * fix style imports * add metrics settings * add bearer token check * mapping metrics configs * fix lint * update config cheat sheet * update conf sample, typo fix --- doc/advanced/config-cheat-sheet.en-us.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/doc/advanced/config-cheat-sheet.en-us.md b/doc/advanced/config-cheat-sheet.en-us.md index a046fd0c..b0ab78d2 100644 --- a/doc/advanced/config-cheat-sheet.en-us.md +++ b/doc/advanced/config-cheat-sheet.en-us.md @@ -302,6 +302,11 @@ Values containing `#` or `;` must be quoted using `` ` `` or `"""`. - `PULL`: **300**: Git pull from internal repositories timeout seconds. - `GC`: **60**: Git repository GC timeout seconds. +## Metrics (`metrics`) + +- `ENABLED`: **false**: Enables /metrics endpoint for prometheus. +- `TOKEN`: **\**: You need to specify the token, if you want to include in the authorization the metrics . The same token need to be used in prometheus parameters `bearer_token` or `bearer_token_file`. + ## API (`api`) - `ENABLE_SWAGGER_ENDPOINT`: **true**: Enables /api/swagger, /api/v1/swagger etc. endpoints. True or false; default is true.