aboutsummaryrefslogtreecommitdiff
path: root/hosts/common/server
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2022-03-05 19:22:21 -0800
committerFranck Cuny <franck@fcuny.net>2022-03-05 19:22:21 -0800
commit0a03af2c236e6e23407cfbd5126963df439a5485 (patch)
tree57e39b82434cae18d68b67a82891ef32c5665eed /hosts/common/server
parentbackups: do the backup over ssh (diff)
downloadinfra-0a03af2c236e6e23407cfbd5126963df439a5485.tar.gz
prometheus: scrape nodeexporter for the rtr
Diffstat (limited to 'hosts/common/server')
-rw-r--r--hosts/common/server/prometheus.nix39
1 files changed, 24 insertions, 15 deletions
diff --git a/hosts/common/server/prometheus.nix b/hosts/common/server/prometheus.nix
index a27e3cc..69abec3 100644
--- a/hosts/common/server/prometheus.nix
+++ b/hosts/common/server/prometheus.nix
@@ -12,26 +12,35 @@
"--web.enable-admin-api"
];
- scrapeConfigs = [
- {
- job_name = "node";
- static_configs = [
- {targets = ["192.168.6.10:9100" "192.168.6.20:9100"]; }
- ];
- relabel_configs = [{
- source_labels = ["__address__"];
+ scrapeConfigs = [{
+ job_name = "node";
+ static_configs = [{
+ targets =
+ [ "192.168.6.1:9100" "192.168.6.10:9100" "192.168.6.20:9100" ];
+ }];
+ relabel_configs = [
+ {
+ source_labels = [ "__address__" ];
target_label = "instance";
replacement = "nas";
action = "replace";
- regex = "192\.168\.6\.10:(.*)";
- } {
- source_labels = ["__address__"];
+ regex = "192.168.6.10:(.*)";
+ }
+ {
+ source_labels = [ "__address__" ];
+ target_label = "instance";
+ replacement = "rtr";
+ action = "replace";
+ regex = "192.168.6.1:(.*)";
+ }
+ {
+ source_labels = [ "__address__" ];
target_label = "instance";
replacement = "tahoe";
action = "replace";
- regex = "192\.168\.6\.20:(.*)";
- }];
- }
- ];
+ regex = "192.168.6.20:(.*)";
+ }
+ ];
+ }];
};
}