From 3d5b2d9dda35ede4e7fb5694b46e684d17225315 Mon Sep 17 00:00:00 2001 From: sinavir Date: Fri, 29 Apr 2022 15:20:42 +0200 Subject: [PATCH] =?UTF-8?q?grafana=20accessible=20depuis=20l'ext=C3=A9rieu?= =?UTF-8?q?r?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hosts/hackens-org/configuration.nix | 2 +- hosts/hackens-org/{prometheus => monitoring}/config.yaml | 0 hosts/hackens-org/{prometheus => monitoring}/default.nix | 8 ++++++++ .../{prometheus => monitoring}/mqtt2prometheus.nix | 0 4 files changed, 9 insertions(+), 1 deletion(-) rename hosts/hackens-org/{prometheus => monitoring}/config.yaml (100%) rename hosts/hackens-org/{prometheus => monitoring}/default.nix (75%) rename hosts/hackens-org/{prometheus => monitoring}/mqtt2prometheus.nix (100%) diff --git a/hosts/hackens-org/configuration.nix b/hosts/hackens-org/configuration.nix index d7083a6..a52e139 100644 --- a/hosts/hackens-org/configuration.nix +++ b/hosts/hackens-org/configuration.nix @@ -13,7 +13,7 @@ ./wiki.nix ./webpass.nix ./mosquitto.nix - ./prometheus + ./monitoring ./kfet2mqtt.nix # ./bridge.nix # ./gha.nix diff --git a/hosts/hackens-org/prometheus/config.yaml b/hosts/hackens-org/monitoring/config.yaml similarity index 100% rename from hosts/hackens-org/prometheus/config.yaml rename to hosts/hackens-org/monitoring/config.yaml diff --git a/hosts/hackens-org/prometheus/default.nix b/hosts/hackens-org/monitoring/default.nix similarity index 75% rename from hosts/hackens-org/prometheus/default.nix rename to hosts/hackens-org/monitoring/default.nix index ecd0a8c..022c38b 100644 --- a/hosts/hackens-org/prometheus/default.nix +++ b/hosts/hackens-org/monitoring/default.nix @@ -27,6 +27,14 @@ grafana = { enable = true; }; + services.nginx.virtualHosts."monitoring.new.hackens.org" = { + forceSSL = true; + enableACME = true; + locations."/" = { + proxyPass = "http://localhost:3000"; + proxyWebsockets = true; + }; + }; }; networking.firewall.allowedTCPPorts = [ 3000 ]; } diff --git a/hosts/hackens-org/prometheus/mqtt2prometheus.nix b/hosts/hackens-org/monitoring/mqtt2prometheus.nix similarity index 100% rename from hosts/hackens-org/prometheus/mqtt2prometheus.nix rename to hosts/hackens-org/monitoring/mqtt2prometheus.nix