add extra logging to 0.24.0, save build and build script fsf
authorIan Kelling <iank@fsf.org>
Wed, 2 Aug 2023 20:44:13 +0000 (16:44 -0400)
committerIan Kelling <iank@fsf.org>
Wed, 2 Aug 2023 20:44:13 +0000 (16:44 -0400)
fsfbuild/blackbox_exporter [new file with mode: 0755]
fsfmake.sh [new file with mode: 0755]
prober/http.go

diff --git a/fsfbuild/blackbox_exporter b/fsfbuild/blackbox_exporter
new file mode 100755 (executable)
index 0000000..ae49edb
Binary files /dev/null and b/fsfbuild/blackbox_exporter differ
diff --git a/fsfmake.sh b/fsfmake.sh
new file mode 100755 (executable)
index 0000000..8fe705d
--- /dev/null
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+# fixes this error:
+# ERRO Running error: context loading failed: failed to load packages: timed out to load packages: context deadline exceeded
+# golangci-lint run  ./...
+# ERRO Timeout exceeded: try increasing it by passing --timeout option
+# make: *** [Makefile.common:173: common-lint] Error 4
+
+# the hidden message is: for most people, taking this long would be an
+# error, but if you are on a really slow computer, we have a flag you
+# can add
+
+GOLANGCI_LINT_OPTS=--timeout=5m
+
+
+make
index 441edc47d895baa3cf7ebb37a0902ec98d41b41b..cb15b791c68d8859128082be11b3e61baa42f60f 100644 (file)
@@ -53,12 +53,14 @@ func matchRegularExpressions(reader io.Reader, httpConfig config.HTTPProbe, logg
        for _, expression := range httpConfig.FailIfBodyMatchesRegexp {
                if expression.Regexp.Match(body) {
                        level.Error(logger).Log("msg", "Body matched regular expression", "regexp", expression)
+                       level.Debug(logger).Log("msg", "Received html body", "body", body)
                        return false
                }
        }
        for _, expression := range httpConfig.FailIfBodyNotMatchesRegexp {
                if !expression.Regexp.Match(body) {
                        level.Error(logger).Log("msg", "Body did not match regular expression", "regexp", expression)
+                       level.Debug(logger).Log("msg", "Received html body", "body", body)
                        return false
                }
        }