Skip to content
Snippets Groups Projects
Commit ff86e31f authored by Florian Sesser's avatar Florian Sesser
Browse files

Monitor PaymentServer

parent 4de04188
No related branches found
No related tags found
No related merge requests found
......@@ -49,7 +49,7 @@ let
gridlib.monitoring
(gridlib.hardware-virtual ({ publicIPv4 = "192.168.67.24"; }))
(gridlib.customize-monitoring {
inherit hostsMap vpnClientIPs nodeExporterTargets;
inherit hostsMap vpnClientIPs nodeExporterTargets paymentExporterTargets;
inherit (config) domain publicKeyPath privateKeyPath;
monitoringvpnIPv4 = "172.23.23.1";
stateVersion = "19.09";
......@@ -66,6 +66,7 @@ let
};
vpnClientIPs = [ "172.23.23.11" "172.23.23.12" "172.23.23.13" ];
nodeExporterTargets = [ "monitoring" "payments" "storage1" "storage2" ];
paymentExporterTargets = [ "payments" ];
in {
network = {
......
......@@ -28,7 +28,7 @@ let
gridlib.monitoring
gridlib.hardware-aws
(gridlib.customize-monitoring {
inherit hostsMap vpnClientIPs nodeExporterTargets;
inherit hostsMap vpnClientIPs nodeExporterTargets paymentExporterTargets;
inherit (config) domain publicKeyPath privateKeyPath;
monitoringvpnIPv4 = "172.23.23.1";
stateVersion = "19.09";
......@@ -103,6 +103,7 @@ let
"storage004"
"storage005"
];
paymentExporterTargets = [ "payments" ];
in {
network = {
......
......@@ -39,7 +39,7 @@ let
gridlib.monitoring
gridlib.hardware-aws
(gridlib.customize-monitoring {
inherit hostsMap vpnClientIPs nodeExporterTargets;
inherit hostsMap vpnClientIPs nodeExporterTargets paymentExporterTargets;
inherit (config) domain publicKeyPath privateKeyPath;
monitoringvpnIPv4 = "172.23.23.1";
stateVersion = "19.09";
......@@ -55,6 +55,7 @@ let
};
vpnClientIPs = [ "172.23.23.11" "172.23.23.12" ];
nodeExporterTargets = [ "monitoring" "payments" "storage001" ];
paymentExporterTargets = [ "payments" ];
in {
network = {
......
......@@ -26,6 +26,10 @@
# which nodes to scrape "nginxExporter" metrics from.
, nginxExporterTargets ? []
# A list of VPN clients (IP addresses or hostnames) as strings indicating
# which nodes to scrape PaymentServer metrics from.
, paymentExporterTargets ? []
# A string giving the NixOS state version for the system.
, stateVersion
, ...
......@@ -52,6 +56,7 @@
services.private-storage.monitoring.prometheus = {
inherit nodeExporterTargets;
inherit nginxExporterTargets;
inherit paymentExporterTargets;
};
system.stateVersion = stateVersion;
......
......@@ -26,6 +26,11 @@ in {
example = lib.literalExample "[ node1 node2 ]";
description = "List of nodes (hostnames or IPs) to scrape.";
};
paymentExporterTargets = 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 = "payment-exporters";
scheme = "https";
tls_config.insecure_skip_verify = true;
static_configs = [{
targets = cfg.paymentExporterTargets;
}];
relabel_configs = [ dropPortNumber ];
}
];
};
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment