From cdee34a39f424025cbae14d0e03db96866a36859 Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Mon, 4 Apr 2022 18:51:11 -0700 Subject: prometheus: we need to specify the IP protocol If we don't, by default we try over ipv6, and this is not going to work well for us (yet): ``` ts=2022-04-05T01:39:13.830414184Z caller=main.go:130 module=https_2xx target=https://notes.fcuny.net level=error msg="Error for HTTP request" err="Get \"https://[2a09:8280:1::a:2aed]\": dial tcp [2a09:8280:1::a:2aed]:443: connect: network is unreachable" ``` --- hosts/common/server/prometheus.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'hosts/common') diff --git a/hosts/common/server/prometheus.nix b/hosts/common/server/prometheus.nix index 05162a8..e85c242 100644 --- a/hosts/common/server/prometheus.nix +++ b/hosts/common/server/prometheus.nix @@ -10,10 +10,14 @@ let method = "GET"; valid_status_codes = [ ]; fail_if_not_ssl = true; + no_follow_redirects = false; + tls_config = { insecure_skip_verify = false; }; + preferred_ip_protocol = "ip4"; }; }; icmp = { prober = "icmp"; + icmp = { preferred_ip_protoco = "ip4"; }; timeout = "5s"; }; }; @@ -66,7 +70,7 @@ in { metrics_path = "/probe"; params = { module = [ "icmp" ]; }; static_configs = - [{ targets = [ "8.8.8.8" "1.1.1.1" "git.fcuny.net" ]; }]; + [{ targets = [ "8.8.8.8" "1.1.1.1" "git.fcuny.net" "fcuny.net" ]; }]; relabel_configs = [ { source_labels = [ "__address__" ]; -- cgit 1.4.1