hipages / php-fpm_exporter

A prometheus exporter for PHP-FPM.
Apache License 2.0
587 stars 117 forks source link

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

Open pschonmann opened 1 year ago

pschonmann commented 1 year ago

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 :)