h7x4
8a42e97014
- 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
19 lines
412 B
Nix
19 lines
412 B
Nix
{ config, ... }: let
|
|
cfg = config.services.prometheus;
|
|
in {
|
|
services.prometheus = {
|
|
scrapeConfigs = [{
|
|
job_name = "php-fpm";
|
|
scrape_interval = "15s";
|
|
static_configs = [{
|
|
targets = [ "${cfg.exporters.php-fpm.listenAddress}:${toString cfg.exporters.nginx.port}" ];
|
|
}];
|
|
}];
|
|
|
|
exporters.php-fpm = {
|
|
enable = true;
|
|
listenAddress = "127.0.0.1";
|
|
};
|
|
};
|
|
}
|