Open J5lx opened 4 years ago
@J5lx Great question. To be frank I have not tested the config file part and just assumed cobra (the library we use) is dealing with it.
I will investigate this and document the use.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I would still like to see this bug fixed.
How is this going? I see pr #154 addresses this issue, but is not reviewd yet?
If you are using systemd, then you can modify service which starts prometheus-php-fpm-exporter
process.
systemctl edit --full prometheus-php-fpm-exporter.service
It has line Environment=PHP_FPM_SCRAPE_URI=unix:///run/php-fpm/php-fpm.sock;/status
I spied in the help output of the program that it seems to support a configuration file. So I tried to set phpfpm.scrape-uri through this configuration file (both in the default location ~/.php-fpm_exporter.yaml and in a custom location via
--config
), however in the end I was unable to pass the configuration to the exporter that way, even though the file does seem to be found (output: “Using config file: /home/j5lx/.php-fpm_exporter.yaml”). I tried various syntaxes:…but to no avail. Supplying the uri via the
PHP_FPM_SCRAPE_URI
environment variable, however, did work. Is there some secret syntax that I just can’t figure out or is the configuration file perhaps not entirely wired up to the rest of the program?I’m using version 1.1.1.