MyNixOS website logo
option

services.prometheus.exporters.php-fpm.environmentFile

Environment file as defined in systemd.exec(5).

Secrets may be passed to the service without adding them to the world-readable Nix store, by specifying placeholder variables as the option value in Nix and setting these variables accordingly in the environment file.

Environment variables from this file will be interpolated into the config file using envsubst with this syntax: $ENVIRONMENT ${VARIABLE}

For variables to use see options and defaults.

The main use is to set the PHP_FPM_SCRAPE_URI that indicate how to connect to PHP-FPM process.

  # Content of the environment file
  PHP_FPM_SCRAPE_URI="unix:///tmp/php.sock;/status"

Note that this file needs to be available on the host on which this exporter is running.

Declarations
Type
null or path
Default
null
Example
"/root/prometheus-php-fpm-exporter.env"