From 89f5319a8f5d5e6cab7a605bdfef37329bb3f191 Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Mon, 4 Apr 2022 14:22:36 -0700 Subject: prometheus: add scraper for HTTP --- hosts/common/server/prometheus.nix | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'hosts') 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 @@ -84,6 +84,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 = -- cgit 1.4.1