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

support set default value when scrape failed #3

Merged
merged 2 commits into from
Dec 13, 2021
Merged

Conversation

suninuni
Copy link

  • 根据 tomasen/fcgi_client 未 merge 的 PR,将 fcgi_client 改成了 github.com/kanocz/fcgi_client 的版本以支持设置超时,目前设置的是 2s。
  • scrape failed 时默认会返回 phpfpm_scrape_failures 和 phpfpm_up 来标识 scrape 失败,因此在此基础上加上了 --phpfpm.default-active-processes 用于设置失败时的 phpfpm_active_processes。
# HELP phpfpm_active_processes The number of active processes.
# TYPE phpfpm_active_processes gauge
phpfpm_active_processes{pool="www",scrape_uri="tcp://127.0.0.1:9000/status"} 100
# HELP phpfpm_scrape_failures The number of failures scraping from PHP-FPM.
# TYPE phpfpm_scrape_failures counter
phpfpm_scrape_failures{pool="www",scrape_uri="tcp://127.0.0.1:9000/status"} 15
# HELP phpfpm_up Could PHP-FPM be reached?
# TYPE phpfpm_up gauge
phpfpm_up{pool="www",scrape_uri="tcp://127.0.0.1:9000/status"} 0

@suninuni suninuni requested a review from inetfuture December 13, 2021 03:14
@suninuni
Copy link
Author

@inetfuture please review and merge

@inetfuture inetfuture merged commit 4d483c4 into master Dec 13, 2021
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