diff --git a/morph/grid/local/grid.nix b/morph/grid/local/grid.nix index b71c6e614de9eeedc2cd7ed6f3d0b8fb289e9268..069545e3d6a78dad29290755c7e0d917b1e38a41 100644 --- a/morph/grid/local/grid.nix +++ b/morph/grid/local/grid.nix @@ -17,6 +17,7 @@ import ../../lib/make-grid.nix { }; vpnClientIPs = [ "172.23.23.11" "172.23.23.12" "172.23.23.13" ]; nodeExporterTargets = [ "monitoring1" "payments1" "storage1" "storage2" ]; + issuerTargets = [ "payments1" ]; in { "payments1" = import ../../lib/make-issuer.nix (rec { @@ -49,6 +50,7 @@ import ../../lib/make-grid.nix { inherit vpnClientIPs; inherit hostsMap; inherit nodeExporterTargets; + inherit issuerTargets; hardware = import ./virtual-hardware.nix ({ inherit publicIPv4; }); stateVersion = "19.09"; inherit sshUsers; diff --git a/morph/lib/make-monitoring.nix b/morph/lib/make-monitoring.nix index acd8c1e924f48b5a838b209e4bb09d21f34f368f..815b9fe77360f9a59f8f22d38402b0c9626f5e5e 100644 --- a/morph/lib/make-monitoring.nix +++ b/morph/lib/make-monitoring.nix @@ -10,6 +10,7 @@ , vpnClientIPs ? null , nodeExporterTargets ? [] , nginxExporterTargets ? [] +, issuerTargets ? [] , hostsMap ? {} , ... }: let @@ -69,6 +70,7 @@ in rec { services.private-storage.monitoring.prometheus = { inherit nodeExporterTargets; inherit nginxExporterTargets; + inherit issuerTargets; }; system.stateVersion = stateVersion; diff --git a/nixos/modules/monitoring/server/prometheus.nix b/nixos/modules/monitoring/server/prometheus.nix index 36c2ba6402559771dff8771b1369842e21f7ff7f..72b57a2156204681407e71af76a40396c1cbc67f 100644 --- a/nixos/modules/monitoring/server/prometheus.nix +++ b/nixos/modules/monitoring/server/prometheus.nix @@ -26,6 +26,11 @@ in { example = lib.literalExample "[ node1 node2 ]"; description = "List of nodes (hostnames or IPs) to scrape."; }; + issuerTargets = lib.mkOption { + type = with lib.types; listOf str; + example = lib.literalExample "[ node1 node2 ]"; + description = "List of nodes (hostnames or IPs) to scrape."; + }; }; config = rec { @@ -49,6 +54,15 @@ in { }]; relabel_configs = [ dropPortNumber ]; } + { + job_name = "issuers"; + scheme = "https"; + tls_config.insecure_skip_verify = true; + static_configs = [{ + targets = cfg.issuerTargets; + }]; + relabel_configs = [ dropPortNumber ]; + } ]; }; };