feat(whitby): Enable nginx prometheus exporter

Might be nice to look at rates of requests etc.

Change-Id: I4d12ab0c1a555793e803de4a9614e616951a94e5
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5125
Reviewed-by: lukegb <lukegb@tvl.fyi>
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
Autosubmit: grfn <grfn@gws.fyi>
This commit is contained in:
Griffin Smith 2022-01-29 17:49:47 -05:00 committed by grfn
parent 63b09a6466
commit 84304b925a

View file

@ -483,7 +483,9 @@ in {
# Prometheus is inside the respective service modules. # Prometheus is inside the respective service modules.
services.prometheus = { services.prometheus = {
enable = true; enable = true;
exporters.node = {
exporters = {
node = {
enable = true; enable = true;
enabledCollectors = [ enabledCollectors = [
@ -493,12 +495,25 @@ in {
]; ];
}; };
nginx = {
enable = true;
sslVerify = false;
constLabels = [ "host=whitby" ];
};
};
scrapeConfigs = [{ scrapeConfigs = [{
job_name = "node"; job_name = "node";
scrape_interval = "5s"; scrape_interval = "5s";
static_configs = [{ static_configs = [{
targets = ["localhost:${toString config.services.prometheus.exporters.node.port}"]; targets = ["localhost:${toString config.services.prometheus.exporters.node.port}"];
}]; }];
} {
job_name = "nginx";
scrape_interval = "5s";
static_configs = [{
targets = ["localhost:${toString config.services.prometheus.exporters.nginx.port}"];
}];
}]; }];
}; };