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

Set ErrorHandling to ContinueOnError when gathering metrics from scripts #15



Copy link

@Meroje Meroje commented May 17, 2019

When gathering metrics on a busy pool (or crashed/stopped) with script-collectors the fcgi error results in a 500 from the exporter, with the message as body.

An error has occurred during metrics collection:

[from Gatherer #2] dial unix /run/php-sock/php7.2-fpm.sock: connect: no such file or directory

By setting HandlerOpts we can have the error logged to stdout and metrics served as best-effort, in our case only php_fpm_up set to 0.

# HELP php_fpm_up Whether scraping PHP-FPM's metrics was successful.
# TYPE php_fpm_up gauge
php_fpm_up{socket_path="/run/php-sock/php7.2-fpm.sock"} 0

@Lusitaniae Lusitaniae merged commit 423f5d9 into Lusitaniae:master Jun 21, 2019
Copy link

Thanks for the contribution @Meroje

@Meroje Meroje deleted the fix/errorhandling-script-gatherer branch November 23, 2021 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

None yet

2 participants