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.
|
||||
services.prometheus = {
|
||||
enable = true;
|
||||
exporters.node = {
|
||||
enable = true;
|
||||
|
||||
enabledCollectors = [
|
||||
"logind"
|
||||
"processes"
|
||||
"systemd"
|
||||
];
|
||||
exporters = {
|
||||
node = {
|
||||
enable = true;
|
||||
|
||||
enabledCollectors = [
|
||||
"logind"
|
||||
"processes"
|
||||
"systemd"
|
||||
];
|
||||
};
|
||||
|
||||
nginx = {
|
||||
enable = true;
|
||||
sslVerify = false;
|
||||
constLabels = [ "host=whitby" ];
|
||||
};
|
||||
};
|
||||
|
||||
scrapeConfigs = [{
|
||||
|
@ -499,6 +508,12 @@ in {
|
|||
static_configs = [{
|
||||
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