Sha256: 267de097a0870c0713bddd8a2010bc5800de1ffcccab9df24e17a7830995ef10
Contents?: true
Size: 1.12 KB
Versions: 2
Compression:
Stored size: 1.12 KB
Contents
WebAdminApp.use Rack::ReverseProxy do reverse_proxy /^\/pushgateway\/?(.*)$/, get_config.prometheus_pushgateway_url + '/' reverse_proxy_options preserve_host: true end WebAdminApp.use Rack::ReverseProxy do reverse_proxy /^\/prometheus\/?(.*)$/, get_config.prometheus_url + '/' reverse_proxy_options preserve_host: true end WebAdminApp.use Rack::ReverseProxy do reverse_proxy /^\/alertmanager\/?(.*)$/, get_config.prometheus_alertmanager_url + '/' reverse_proxy_options preserve_host: true end WebAdminApp.get '/proxy/links' do get_menu 5 config = get_config if config.webadmin_proxy == true then @proxy = true @pushgateway_url = "http://#{config.webadmin_ip}:#{config.webadmin_port}/pushgateway" @prometheus_url = "http://#{config.webadmin_ip}:#{config.webadmin_port}/prometheus" @alertmanager_url = "http://#{config.webadmin_ip}:#{config.webadmin_port}/prometheus" else @proxy = false @pushgateway_url = "#{config.prometheus_pushgateway_url}" @alertmanager_url = "#{config.prometheus_alertmanager_url}" @prometheus_url = "#{config.prometheus_url}" end slim :proxy, :format => :html end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
prometheus-splash-0.8.1 | lib/splash/webadmin/portal/controllers/proxy.rb |
prometheus-splash-0.8.0 | lib/splash/webadmin/portal/controllers/proxy.rb |