diff options
author | Franck Cuny <franck@fcuny.net> | 2022-04-04 14:22:36 -0700 |
---|---|---|
committer | Franck Cuny <franck@fcuny.net> | 2022-04-04 14:22:36 -0700 |
commit | 89f5319a8f5d5e6cab7a605bdfef37329bb3f191 (patch) | |
tree | d40021998931e8524ed44fc8b0df7a5b4762eaf7 | |
parent | prometheus: configure correctly the blackbox (diff) | |
download | world-89f5319a8f5d5e6cab7a605bdfef37329bb3f191.tar.gz |
prometheus: add scraper for HTTP
-rw-r--r-- | hosts/common/server/prometheus.nix | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/hosts/common/server/prometheus.nix b/hosts/common/server/prometheus.nix index 012fdb5..9128f31 100644 --- a/hosts/common/server/prometheus.nix +++ b/hosts/common/server/prometheus.nix @@ -85,6 +85,34 @@ in { ]; } { + job_name = "blackbox-http"; + metrics_path = "/probe"; + params = { module = [ "http_2xx" ]; }; + static_configs = [{ + targets = [ + "fcuny.net" + "git.fcuny.net" + "notes.fcuny.net" + "dash.fcuny.net" + "music.fcuny.net" + ]; + }]; + relabel_configs = [ + { + source_labels = [ "__address__" ]; + target_label = "__param_target"; + } + { + source_labels = [ "__param_target" ]; + target_label = "instance"; + } + { + target_label = "__address__"; + replacement = "localhost:9115"; + } + ]; + } + { job_name = "node"; static_configs = [{ targets = [ "192.168.6.1:9100" "192.168.6.20:9100" ]; }]; |