-
Notifications
You must be signed in to change notification settings - Fork 372
fix: separate nginx_up availability from scrape success #978 #1202
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
base: main
Are you sure you want to change the base?
Conversation
|
Hi @aaaTurbo! Welcome to the project! 🎉 Thanks for opening this pull request! |
|
✅ All required contributors have signed the F5 CLA for this PR. Thank you! |
|
I have hereby read the F5 CLA and agree to its terms |
Signed-off-by: Anton Semenov <90704180+aaaTurbo@users.noreply.github.com>
|
Hi @aaaTurbo, Thank you for creating this issue, We will get to looking at and reviewing this as soon as we can. Thank you! |
|
@AlexFenlon, just checking in on this one. Any updates on the review status when you have a moment? |
Problem
Fixes #978
The
nginx_upmetric currently indicates whether the last scrape was successful, not whether NGINX is actually up. This creates confusion for users who expectnginx_up=0to mean NGINX is down, when it could just mean the scrape failed for other reasons (HTTP errors, parsing issues, etc.).Solution
This PR introduces a clear separation between NGINX availability and scrape success for NGINX Open Source:
New Metrics Added:
nginx_scrape_success- Indicates whether the last scrape was successful (1) or not (0)nginx_scrape_duration_seconds- Duration of the last scrape in secondsnginx_scrape_errors_total{type="..."}- Counter of scrape errors by type (network/http/parse)Behavior Changes:
nginx_up=1- NGINX is reachable (even if scrape fails due to HTTP errors)nginx_up=0- Only when NGINX is truly unreachable (network errors)nginx_scrape_success=0- When scrape fails for any reasonError Type Classification:
network- Connection refused, timeouts, etc. (nginx_up=0)http- HTTP errors like 404, 500, etc. (nginx_up=1)parse- Response parsing errors (nginx_up=1)Scope
Testing
Backward Compatibility
The existing
nginx_upmetric is preserved but now correctly represents NGINX availability rather than scrape success.