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/prometheus/server.nix | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'krebs/2configs/shack/prometheus') diff --git a/krebs/2configs/shack/prometheus/server.nix b/krebs/2configs/shack/prometheus/server.nix index c936f2531..93af88fad 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 From 6d7fe1f11554e8d123c01f1545456b15daa6a26a Mon Sep 17 00:00:00 2001 From: makefu Date: Mon, 2 Sep 2019 15:31:30 +0200 Subject: shack/prometheus/server: lower retention time due to space limitation --- krebs/2configs/shack/prometheus/server.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'krebs/2configs/shack/prometheus') diff --git a/krebs/2configs/shack/prometheus/server.nix b/krebs/2configs/shack/prometheus/server.nix index 93af88fad..12f757e89 100644 --- a/krebs/2configs/shack/prometheus/server.nix +++ b/krebs/2configs/shack/prometheus/server.nix @@ -19,7 +19,7 @@ prometheus = { enable = true; extraFlags = [ - "-storage.local.retention 8760h" + "-storage.local.retention 720h" "-storage.local.series-file-shrink-ratio 0.3" "-storage.local.memory-chunks 2097152" "-storage.local.max-chunks-to-persist 1048576" -- cgit v1.2.3