Skip to content

Conversation

@Meroje
Copy link
Contributor

@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
@Lusitaniae
Copy link
Owner

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants