diff --git a/services/monitoring/victoriametrics.nix b/services/monitoring/victoriametrics.nix index eec749e..e6c6aeb 100644 --- a/services/monitoring/victoriametrics.nix +++ b/services/monitoring/victoriametrics.nix @@ -32,16 +32,23 @@ targets = [ "neptun.orbit.sol:9100" ]; labels.host = "neptun"; } - { - targets = [ "mercury.orbit.sol:9100" ]; - labels.host = "mercury"; - } { targets = [ "terra.orbit.sol:9100" ]; labels.host = "terra"; } ]; } + { + job_name = "node-exporter-mercury"; + scrape_interval = "15s"; + scrape_timeout = "10s"; + static_configs = [ + { + targets = [ "mercury.orbit.sol:9100" ]; + labels.host = "mercury"; + } + ]; + } { job_name = "victoriametrics"; static_configs = [ @@ -59,4 +66,14 @@ # ordering, not a hard dependency: VictoriaMetrics still starts locally if # another host or the tailnet is temporarily unavailable. systemd.services.victoriametrics.after = [ "tailscaled-autoconnect.service" ]; + + fileSystems."/var/lib/private/victoriametrics" = { + device = "/mnt/data/AppData/victoriametrics"; + fsType = "none"; + options = [ "bind" "nofail" ]; + }; + + # The service path is under /var/lib/private, so systemd would otherwise + # derive its mount dependency from the eMMC-backed path alone. + systemd.services.victoriametrics.unitConfig.RequiresMountsFor = [ "/mnt/data" ]; }