scrape haproxy metrics
This commit is contained in:
parent
e7cba90a45
commit
fd02a136ef
1 changed files with 20 additions and 0 deletions
|
|
@ -448,6 +448,7 @@
|
|||
stats show-node
|
||||
stats show-modules
|
||||
stats admin if TRUE # Enable admin operations
|
||||
http-request use-service prometheus-exporter if { path /metrics }
|
||||
|
||||
frontend http-in
|
||||
bind *:80
|
||||
|
|
@ -547,8 +548,27 @@
|
|||
) "" forwards}
|
||||
'';
|
||||
};
|
||||
vector.settings = {
|
||||
sources.haproxy_metrics = {
|
||||
type = "prometheus_scrape";
|
||||
endpoints = [ "http://127.0.0.1:8404/metrics" ];
|
||||
scrape_interval_secs = 15;
|
||||
};
|
||||
transforms.add_host_label_haproxy = {
|
||||
type = "remap";
|
||||
inputs = [ "haproxy_metrics" ];
|
||||
source = ''
|
||||
.tags.host = get_hostname!()
|
||||
'';
|
||||
};
|
||||
sinks.mimir.inputs = lib.mkForce [
|
||||
"add_host_label_metrics"
|
||||
"add_host_label_haproxy"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
];
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue