Set up prometheus nginx exporter
This commit is contained in:
parent
5a011e76d4
commit
271e43040c
|
@ -6,5 +6,6 @@
|
|||
recommendedOptimisation = true;
|
||||
recommendedProxySettings = true;
|
||||
recommendedTlsSettings = true;
|
||||
statusPage = true; # Necessary for prometheus exporter
|
||||
};
|
||||
}
|
||||
|
|
|
@ -10,19 +10,28 @@ in
|
|||
port = 8410;
|
||||
webExternalUrl = "https://${host}";
|
||||
|
||||
# {{{ Node exporter (system info)
|
||||
# {{{ Base exporters
|
||||
exporters = {
|
||||
# System info
|
||||
node = {
|
||||
enable = true;
|
||||
enabledCollectors = [ "systemd" ];
|
||||
port = 8411;
|
||||
};
|
||||
|
||||
nginx = {
|
||||
enable = true;
|
||||
port = 8412;
|
||||
};
|
||||
};
|
||||
|
||||
scrapeConfigs = [{
|
||||
job_name = "lapetus";
|
||||
static_configs = [{
|
||||
targets = [ "127.0.0.1:${toString config.services.prometheus.exporters.node.port}" ];
|
||||
targets = [
|
||||
"127.0.0.1:${toString config.services.prometheus.exporters.node.port}"
|
||||
"127.0.0.1:${toString config.services.prometheus.exporters.nginx.port}"
|
||||
];
|
||||
}];
|
||||
}];
|
||||
# }}}
|
||||
|
|
Loading…
Reference in a new issue