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
3 merge requests!140Merge staging into production,!118Merge develop into staging,!117Add monitoring (scraping + dashboard) for PaymentServer
...@@ -49,7 +49,7 @@ let ...@@ -49,7 +49,7 @@ let
gridlib.monitoring gridlib.monitoring
(gridlib.hardware-virtual ({ publicIPv4 = "192.168.67.24"; })) (gridlib.hardware-virtual ({ publicIPv4 = "192.168.67.24"; }))
(gridlib.customize-monitoring { (gridlib.customize-monitoring {
inherit hostsMap vpnClientIPs nodeExporterTargets; inherit hostsMap vpnClientIPs nodeExporterTargets paymentExporterTargets;
inherit (config) domain publicKeyPath privateKeyPath; inherit (config) domain publicKeyPath privateKeyPath;
monitoringvpnIPv4 = "172.23.23.1"; monitoringvpnIPv4 = "172.23.23.1";
stateVersion = "19.09"; stateVersion = "19.09";
...@@ -66,6 +66,7 @@ let ...@@ -66,6 +66,7 @@ let
}; };
vpnClientIPs = [ "172.23.23.11" "172.23.23.12" "172.23.23.13" ]; vpnClientIPs = [ "172.23.23.11" "172.23.23.12" "172.23.23.13" ];
nodeExporterTargets = [ "monitoring" "payments" "storage1" "storage2" ]; nodeExporterTargets = [ "monitoring" "payments" "storage1" "storage2" ];
paymentExporterTargets = [ "payments" ];
in { in {
network = { network = {
......
...@@ -28,7 +28,7 @@ let ...@@ -28,7 +28,7 @@ let
gridlib.monitoring gridlib.monitoring
gridlib.hardware-aws gridlib.hardware-aws
(gridlib.customize-monitoring { (gridlib.customize-monitoring {
inherit hostsMap vpnClientIPs nodeExporterTargets; inherit hostsMap vpnClientIPs nodeExporterTargets paymentExporterTargets;
inherit (config) domain publicKeyPath privateKeyPath; inherit (config) domain publicKeyPath privateKeyPath;
monitoringvpnIPv4 = "172.23.23.1"; monitoringvpnIPv4 = "172.23.23.1";
stateVersion = "19.09"; stateVersion = "19.09";
...@@ -103,6 +103,7 @@ let ...@@ -103,6 +103,7 @@ let
"storage004" "storage004"
"storage005" "storage005"
]; ];
paymentExporterTargets = [ "payments" ];
in { in {
network = { network = {
......
...@@ -39,7 +39,7 @@ let ...@@ -39,7 +39,7 @@ let
gridlib.monitoring gridlib.monitoring
gridlib.hardware-aws gridlib.hardware-aws
(gridlib.customize-monitoring { (gridlib.customize-monitoring {
inherit hostsMap vpnClientIPs nodeExporterTargets; inherit hostsMap vpnClientIPs nodeExporterTargets paymentExporterTargets;
inherit (config) domain publicKeyPath privateKeyPath; inherit (config) domain publicKeyPath privateKeyPath;
monitoringvpnIPv4 = "172.23.23.1"; monitoringvpnIPv4 = "172.23.23.1";
stateVersion = "19.09"; stateVersion = "19.09";
...@@ -55,6 +55,7 @@ let ...@@ -55,6 +55,7 @@ let
}; };
vpnClientIPs = [ "172.23.23.11" "172.23.23.12" ]; vpnClientIPs = [ "172.23.23.11" "172.23.23.12" ];
nodeExporterTargets = [ "monitoring" "payments" "storage001" ]; nodeExporterTargets = [ "monitoring" "payments" "storage001" ];
paymentExporterTargets = [ "payments" ];
in { in {
network = { network = {
......
...@@ -26,6 +26,10 @@ ...@@ -26,6 +26,10 @@
# which nodes to scrape "nginxExporter" metrics from. # which nodes to scrape "nginxExporter" metrics from.
, nginxExporterTargets ? [] , 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. # A string giving the NixOS state version for the system.
, stateVersion , stateVersion
, ... , ...
...@@ -52,6 +56,7 @@ ...@@ -52,6 +56,7 @@
services.private-storage.monitoring.prometheus = { services.private-storage.monitoring.prometheus = {
inherit nodeExporterTargets; inherit nodeExporterTargets;
inherit nginxExporterTargets; inherit nginxExporterTargets;
inherit paymentExporterTargets;
}; };
system.stateVersion = stateVersion; system.stateVersion = stateVersion;
......
...@@ -26,6 +26,11 @@ in { ...@@ -26,6 +26,11 @@ in {
example = lib.literalExample "[ node1 node2 ]"; example = lib.literalExample "[ node1 node2 ]";
description = "List of nodes (hostnames or IPs) to scrape."; 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 { config = rec {
...@@ -49,6 +54,15 @@ in { ...@@ -49,6 +54,15 @@ in {
}]; }];
relabel_configs = [ dropPortNumber ]; 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.
Please register or to comment