nix-dotfiles/hosts/tsuki/services/grafana/prometheus-exporters/nginx.nix
h7x4 8a42e97014
tsuki/monitoring: misc:
- Secure grafana better, it had secrets in the nix store
- Set up prometheus exporters for nginx and php-fpm
- Add urls for dashboards
- Disable automatic updates
2023-07-12 02:06:39 +02:00

19 lines
406 B
Nix

{ 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";
};
};
}