Skip to content

Commit 920bd9b

Browse files
authored
Merge pull request #579 from jfly/more-probe-fixes
More mailserver probe fixes
2 parents 7d17924 + 5f7f356 commit 920bd9b

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

build/pluto/prometheus/exporters/blackbox.nix

+6-6
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ let
55
{
66
module,
77
targets,
8-
job_name ? "blackbox-${module}",
8+
job_suffix ? "",
99
}:
1010
{
11-
inherit job_name;
11+
job_name = "blackbox-${module}${job_suffix}";
1212
metrics_path = "/probe";
1313
params = {
1414
module = [ module ];
@@ -75,7 +75,7 @@ in
7575
# From https://github.com/prometheus/blackbox_exporter/blob/53e78c2b3535ecedfd072327885eeba2e9e51ea2/example.yml#L120-L133
7676
modules.smtp_starttls = {
7777
prober = "tcp";
78-
timeout = "5s";
78+
timeout = "10s";
7979
tcp = {
8080
query_response = [
8181
{ expect = "^220"; }
@@ -122,8 +122,8 @@ in
122122
# https://github.com/NixOS/infra/issues/485
123123
(mkStaticProbe {
124124
module = "smtp_starttls";
125-
job_name = "smtp_starttls_umbriel";
126-
targets = [ "umbriel.nixos.org" ];
125+
job_suffix = "_umbriel";
126+
targets = [ "umbriel.nixos.org:25" ];
127127
})
128128
(mkDnsSdProbe "smtp_starttls" {
129129
names = [
@@ -162,7 +162,7 @@ in
162162
{
163163
alert = "MxUnreachable";
164164
expr = ''
165-
probe_success{job="blackbox-smtp_starttls"} == 0
165+
probe_success{job=~"blackbox-smtp_starttls.*"} == 0
166166
'';
167167
for = "15m";
168168
labels.severity = "warning";

0 commit comments

Comments
 (0)