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:
parent
63b09a6466
commit
84304b925a
1 changed files with 22 additions and 7 deletions
|
@ -483,14 +483,23 @@ 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 = {
|
|
||||||
enable = true;
|
|
||||||
|
|
||||||
enabledCollectors = [
|
exporters = {
|
||||||
"logind"
|
node = {
|
||||||
"processes"
|
enable = true;
|
||||||
"systemd"
|
|
||||||
];
|
enabledCollectors = [
|
||||||
|
"logind"
|
||||||
|
"processes"
|
||||||
|
"systemd"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
nginx = {
|
||||||
|
enable = true;
|
||||||
|
sslVerify = false;
|
||||||
|
constLabels = [ "host=whitby" ];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
scrapeConfigs = [{
|
scrapeConfigs = [{
|
||||||
|
@ -499,6 +508,12 @@ in {
|
||||||
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}"];
|
||||||
|
}];
|
||||||
}];
|
}];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue