diff options
| -rw-r--r-- | modules/foundation/monitoring.nix | 2 | ||||
| -rw-r--r-- | services/monitoring/default.nix | 4 | ||||
| -rw-r--r-- | services/monitoring/wrapper.nix | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/modules/foundation/monitoring.nix b/modules/foundation/monitoring.nix index 484350f..34ff810 100644 --- a/modules/foundation/monitoring.nix +++ b/modules/foundation/monitoring.nix @@ -37,7 +37,7 @@ in services.vmagent = { enable = true; - remoteWrite.url = "http://127.0.0.1:${toString victoriaDefaultPort}/api/v1/write"; + remoteWrite.url = "http://${me.tailscale.ip}:${toString victoriaDefaultPort}/api/v1/write"; prometheusConfig = { global = { diff --git a/services/monitoring/default.nix b/services/monitoring/default.nix index 60374b5..cf966fb 100644 --- a/services/monitoring/default.nix +++ b/services/monitoring/default.nix @@ -1,4 +1,4 @@ -{ lib, pkgs, auxiliaryPkgs, ... }: +{ me, lib, pkgs, auxiliaryPkgs, ... }: let inherit (pkgs) victoriametrics grafana dockerTools; @@ -37,7 +37,7 @@ in foundation.service.monitoring = { victoria = { image = victoriaImage; - ports = [ victoriaLocalPort ]; + ports = [ (common.tailnetPort me victoriaLocalPort) ]; volumes = [ [ "${victoriaDir}" "/var/lib/victoria" ] diff --git a/services/monitoring/wrapper.nix b/services/monitoring/wrapper.nix index 416ae22..62c860b 100644 --- a/services/monitoring/wrapper.nix +++ b/services/monitoring/wrapper.nix @@ -1,6 +1,6 @@ # This wraps the monitoring service module to allow it to be # imported conditionally. -{ lib, pkgs, auxiliaryPkgs, config, ... }: +{ me, lib, pkgs, auxiliaryPkgs, config, ... }: let enabled = config.foundation.internal.monitoringService; @@ -11,5 +11,5 @@ in monitoringService = lib.mkEnableOption "monitoring service"; }; - config = lib.mkIf enabled (module { inherit lib pkgs auxiliaryPkgs; }); + config = lib.mkIf enabled (module { inherit me lib pkgs auxiliaryPkgs; }); } |
