fix: use correct module name for umbriel probe
Jeremy Fleischman committed
Mar 8, 2025 at 10:51 UTC
33b9ce34e9935de403699bff3f4aae08eb2783f0
1 file changed
+54
-41
build/pluto/prometheus/exporters/blackbox.nix
+54
-41
@@ -1,28 +1,34 @@
1
{ config, pkgs, ... }:
2
3
let
4
- mkStaticProbe = module: targets: {
5
- job_name = "blackbox-${module}";
6
- metrics_path = "/probe";
7
- params = {
8
- module = [ module ];
4
+ mkStaticProbe =
5
+ {
6
+ module,
7
+ targets,
8
+ job_name ? "blackbox-${module}",
9
+ }:
10
+ {
11
+ inherit job_name;
12
+ metrics_path = "/probe";
13
+ params = {
14
+ module = [ module ];
15
+ };
16
+ static_configs = [ { inherit targets; } ];
17
+ relabel_configs = [
18
+ {
19
+ source_labels = [ "__address__" ];
20
+ target_label = "__param_target";
21
+ }
22
+ {
23
+ source_labels = [ "__param_target" ];
24
+ target_label = "instance";
25
+ }
26
+ {
27
+ target_label = "__address__";
28
+ replacement = "localhost:${toString config.services.prometheus.exporters.blackbox.port}";
29
+ }
30
+ ];
31
};
10
- static_configs = [ { inherit targets; } ];
11
- relabel_configs = [
12
- {
13
- source_labels = [ "__address__" ];
14
- target_label = "__param_target";
15
- }
16
- {
17
- source_labels = [ "__param_target" ];
18
- target_label = "instance";
19
- }
20
- {
21
- target_label = "__address__";
22
- replacement = "localhost:${toString config.services.prometheus.exporters.blackbox.port}";
23
- }
24
- ];
25
- };
32
33
mkDnsSdProbe = module: dns_sd_config: {
34
job_name = "blackbox-${module}";
@@ -89,29 +95,36 @@ in
95
};
96
97
scrapeConfigs = [
92
- (mkStaticProbe "https_success" [
93
- "https://cache.nixos.org"
94
- "https://channels.nixos.org"
95
- "https://common-styles.nixos.org"
96
- "https://discourse.nixos.org"
97
- "https://hydra.nixos.org"
98
- "https://mobile.nixos.org"
99
- "https://monitoring.nixos.org"
100
- "https://nixos.org"
101
- "https://planet.nixos.org"
102
- "https://releases.nixos.org"
103
- "https://status.nixos.org"
104
- "https://survey.nixos.org"
105
- "https://tarballs.nixos.org"
106
- "https://weekly.nixos.org"
107
- "https://wiki.nixos.org"
108
- "https://www.nixos.org"
109
- "https://tracker.security.nixos.org"
110
- ])
98
+ (mkStaticProbe {
99
+ module = "https_success";
100
+ targets = [
101
+ "https://cache.nixos.org"
102
+ "https://channels.nixos.org"
103
+ "https://common-styles.nixos.org"
104
+ "https://discourse.nixos.org"
105
+ "https://hydra.nixos.org"
106
+ "https://mobile.nixos.org"
107
+ "https://monitoring.nixos.org"
108
+ "https://nixos.org"
109
+ "https://planet.nixos.org"
110
+ "https://releases.nixos.org"
111
+ "https://status.nixos.org"
112
+ "https://survey.nixos.org"
113
+ "https://tarballs.nixos.org"
114
+ "https://weekly.nixos.org"
115
+ "https://wiki.nixos.org"
116
+ "https://www.nixos.org"
117
+ "https://tracker.security.nixos.org"
118
+ ];
119
+ })
120
# TODO: remove this static probe once `umbriel` is our MX record, and
121
# ImprovMX is out of the picture.
122
# https://github.com/NixOS/infra/issues/485
114
- (mkStaticProbe "smtp_starttls_umbriel" [ "umbriel.nixos.org" ])
123
+ (mkStaticProbe {
124
+ module = "smtp_starttls";
125
+ job_name = "smtp_starttls_umbriel";
126
+ targets = [ "umbriel.nixos.org" ];
127
+ })
128
(mkDnsSdProbe "smtp_starttls" {
129
names = [
130
"nixos.org"