From f7da0cb544b61e318e0c54b5e2c8948d261ce358 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Mon, 24 Apr 2023 08:46:20 +0000 Subject: [PATCH] Proxy websocket requests for prometheus --- cookbooks/prometheus/recipes/server.rb | 1 + cookbooks/prometheus/templates/default/apache.erb | 1 + 2 files changed, 2 insertions(+) diff --git a/cookbooks/prometheus/recipes/server.rb b/cookbooks/prometheus/recipes/server.rb index 8fb8621c7..1c4f8e2d2 100644 --- a/cookbooks/prometheus/recipes/server.rb +++ b/cookbooks/prometheus/recipes/server.rb @@ -391,6 +391,7 @@ end apache_module "alias" apache_module "proxy_http" +apache_module "proxy_wstunnel" ssl_certificate "prometheus.openstreetmap.org" do domains ["prometheus.openstreetmap.org", "prometheus.osm.org"] diff --git a/cookbooks/prometheus/templates/default/apache.erb b/cookbooks/prometheus/templates/default/apache.erb index 629e409e2..1dead4474 100644 --- a/cookbooks/prometheus/templates/default/apache.erb +++ b/cookbooks/prometheus/templates/default/apache.erb @@ -27,6 +27,7 @@ Redirect 403 /alertmanager/api ProxyPass /alertmanager http://localhost:9093/alertmanager ProxyPass /karma http://localhost:8081/karma + ProxyPass /api/live/ws ws://localhost:3000/api/live/ws ProxyPass / http://localhost:3000/ ProxyPreserveHost on -- 2.39.5