nix-dotfiles/hosts/tsuki/services/grafana/prometheus-exporters/nginx.nix

19 lines
406 B
Nix
Raw Normal View History

{ config, ... }: let
cfg = config.services.prometheus;
in {
services.prometheus = {
scrapeConfigs = [{
job_name = "nginx";
scrape_interval = "15s";
static_configs = [{
targets = [ "${cfg.exporters.nginx.listenAddress}:${toString cfg.exporters.nginx.port}" ];
}];
}];
exporters.nginx = {
enable = true;
listenAddress = "127.0.0.1";
};
};
}