From 91833c560a2656d39bda5f87c0c4786670e2fc1f Mon Sep 17 00:00:00 2001 From: makefu Date: Sat, 20 Jul 2019 00:10:16 +0200 Subject: shack/prometheus: remove legacy config --- krebs/2configs/shack/mqtt.nix | 1 + krebs/2configs/shack/prometheus/server.nix | 11 ++++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/krebs/2configs/shack/mqtt.nix b/krebs/2configs/shack/mqtt.nix index 8e5438db..e78f0f97 100644 --- a/krebs/2configs/shack/mqtt.nix +++ b/krebs/2configs/shack/mqtt.nix @@ -1,3 +1,4 @@ +# hostname: mqtt.shack { networking.firewall.allowedTCPPorts = [ 1883 ]; networking.firewall.allowedUDPPorts = [ 1883 ]; diff --git a/krebs/2configs/shack/prometheus/server.nix b/krebs/2configs/shack/prometheus/server.nix index c936f253..93af88fa 100644 --- a/krebs/2configs/shack/prometheus/server.nix +++ b/krebs/2configs/shack/prometheus/server.nix @@ -3,14 +3,19 @@ { networking = { firewall.allowedTCPPorts = [ - 3000 # grafana 9090 # prometheus 9093 # alertmanager ]; - useDHCP = true; }; - services = { + nginx.virtualHosts = { + "prometheus.shack" = { + locations."/".proxyPass = "http://localhost:9090"; + }; + "alert.prometheus.shack" = { + locations."/".proxyPass = "http://localhost:9093"; + }; + }; prometheus = { enable = true; extraFlags = [ -- cgit v1.2.3