about summary refs log tree commit diff
path: root/hosts/common
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2022-04-04 18:51:11 -0700
committerFranck Cuny <franck@fcuny.net>2022-04-04 18:51:11 -0700
commitcdee34a39f424025cbae14d0e03db96866a36859 (patch)
tree06eab7c24981dfa24322c9e0d5e477339dc3578d /hosts/common
parentprometheus: I'll get this right this time (diff)
downloadworld-cdee34a39f424025cbae14d0e03db96866a36859.tar.gz
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"
```
Diffstat (limited to 'hosts/common')
-rw-r--r--hosts/common/server/prometheus.nix6
1 files changed, 5 insertions, 1 deletions
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__" ];