Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

level=error msg="Error scraping PHP-FPM: invalid character 'F' looking for beginning of value" #314

Open
pschonmann opened this issue Aug 18, 2023 · 0 comments

Comments

@pschonmann
Copy link

Hi, i have systemctl unit thats one day reboot to "refresh" scrape uris when changed on server

[Unit]
Description=PHP FPM exporter
[Service]
ExecStart=/bin/bash /usr/sbin/php-fpm-exporter_systemd.sh
Restart=always
RuntimeMaxSec=1d
[Install]
WantedBy=multi-user.target

the command in shell script is

/usr/sbin/php-fpm_exporter server --phpfpm.fix-process-count --web.listen-address ":9097" $(for PHPSOCKET in $(find /run/php/* -not -iname '*php*-fpm.sock' -not -iname '*php*-fpm.pid');do echo -n "--phpfpm.scrape-uri \"unix://$PHPSOCKET;/statusfpm\" ";done)

count is not small but not too large exceed args limit

find /run/php/* -not -iname '*php*-fpm.sock' -not -iname '*php*-fpm.pid' | wc -l
119

In the syslogs im getting too much info about error scraping in title, but seems scraping works (+2 are help)

curl -s localhost:9097/metrics | grep 'phpfpm_up' | wc -l
121

Its strange behaviour :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant