summaryrefslogtreecommitdiff
path: root/config/routes
diff options
context:
space:
mode:
authorrpereira2 <rpereira@gitlab.com>2019-04-02 11:56:09 +0530
committerrpereira2 <rpereira@gitlab.com>2019-04-05 02:12:33 +0530
commite1a167ee234fbb8886ac1a882002b76adeb67edf (patch)
treed7bd9ce87625fe792ea912641fe844b667459568 /config/routes
parent5dd6e752c0c3d572c645ac56a79c6c5a3fbd5157 (diff)
downloadgitlab-ce-e1a167ee234fbb8886ac1a882002b76adeb67edf.tar.gz
Add a Prometheus API per environment
The api will proxy requests to the environment's prometheus server. The Prometheus::ProxyService class can be reused when we add support for group prometheus servers.
Diffstat (limited to 'config/routes')
-rw-r--r--config/routes/project.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/config/routes/project.rb b/config/routes/project.rb
index d60a5cc9ae8..1cb8f331f6f 100644
--- a/config/routes/project.rb
+++ b/config/routes/project.rb
@@ -219,6 +219,8 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do
get :metrics
get :additional_metrics
get '/terminal.ws/authorize', to: 'environments#terminal_websocket_authorize', constraints: { format: nil }
+
+ get '/prometheus/api/v1/*proxy_path', to: 'environments/prometheus_api#proxy'
end
collection do