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

Fix escaping for all broken string values in php-fpm status json #291

Open
jvrsantacruz opened this issue Mar 24, 2023 · 0 comments
Open

Comments

@jvrsantacruz
Copy link

jvrsantacruz commented Mar 24, 2023

Hi all! 👋

We're experiencing the same issue in related issue #24 and probably #258 but with another field (user in this case).
Clients sending invalid json values showing up in any string field of the status json will break the exporter.

eg:

Sending: user: my\small\windows\value
Would trigger the following errors in the exporter:

Feb 15 01:02:18  prometheus-php-fpm[1451]: time="2023-02-15T01:02:18Z" level=error msg="invalid character 's' in string escape code"
Feb 15 01:02:18 prometheus-php-fpm[1451]: time="2023-02-15T01:02:18Z" level=error msg="Error scraping PHP-FPM: invalid character 's' in string escape code"
jvrsantacruz added a commit to jvrsantacruz/php-fpm_exporter that referenced this issue Mar 24, 2023
jvrsantacruz added a commit to jvrsantacruz/php-fpm_exporter that referenced this issue Mar 24, 2023
jvrsantacruz added a commit to jvrsantacruz/php-fpm_exporter that referenced this issue Apr 3, 2023
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