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

Traefik should report traefik_backend_server_up 0 for unhealthy backends #4853

Open
1 of 2 tasks
rinokadijk opened this issue May 7, 2019 · 5 comments
Open
1 of 2 tasks
Labels
area/provider/marathon kind/bug/possible a possible bug that needs analysis before it is confirmed or fixed. priority/P2 need to be fixed in the future

Comments

@rinokadijk
Copy link

Do you want to request a feature or report a bug?

Bug

Did you try using a 1.7.x configuration for the version 2.0?

  • Yes
  • No

What did you do?

Scale an application that never becomes healthy in marathon. Traefik reports traefik_backend_server_up 1 for all backends

What did you expect to see?

According to the documentation:

# HELP traefik_backend_server_up Backend server is up, described by gauge value of 0 or 1.
# TYPE traefik_backend_server_up gauge
traefik_backend_server_up{backend="backend-my-service",url="http://xxx:yyy"} 1

For an unhealthy backend I would expect:

# HELP traefik_backend_server_up Backend server is up, described by gauge value of 0 or 1.
# TYPE traefik_backend_server_up gauge
traefik_backend_server_up{backend="backend-my-service",url="http://xxx:yyy"} 0

What did you see instead?

traefik_backend_server_up 1 for all (even unhealthy) backends

Output of traefik version: 1.7.9

1.7.9

What is your environment & configuration (arguments, toml, provider, platform, ...)?

debug = true

logLevel = "DEBUG"


[api]
entryPoint = "api"

[entryPoints]
    [entryPoints.http]
       address = ":80"
     [entryPoints.api]
       address = ":8090"  

[marathon]
    endpoint = "http://marathon:8080"
    domain = "marathon.localhost"
    exposedbydefault = true
@Ullaakut
Copy link
Contributor

Ullaakut commented May 7, 2019

How do you know that your backends are unhealthy? What do you call unhealthy in your case?

If you could provide a way to reproduce your issue that'd be great, thanks.

@rinokadijk
Copy link
Author

I would expect ANY application with a failing marathon healthcheck (https://docs.traefik.io/user-guide/marathon/#failure) to have:

traefik_backend_server_up{backend="backend-my-service",url="http://xxx:yyy"} 0

However, Traefik ALWAYS exposes:

traefik_backend_server_up{backend="backend-my-service",url="http://xxx:yyy"} 1

@dtomcej dtomcej added area/provider/marathon kind/bug/possible a possible bug that needs analysis before it is confirmed or fixed. priority/P2 need to be fixed in the future and removed contributor/waiting-for-feedback status/0-needs-triage labels May 9, 2019
@martin-koerner
Copy link

E.g. for backends without any available Server there is obviously some check in the Web GUI - the backend is displayed red:

image

However, there is no prometheus metric exposing that this backend is even existing. I would expect a traefik_backend_server_up: 0 for this backend.

How do you know that your backends are unhealthy? What do you call unhealthy in your case?

If you could provide a way to reproduce your issue that'd be great, thanks.

@soleetions
Copy link

What's the status on this issue? I'm facing the same

@yuklia
Copy link

yuklia commented Oct 6, 2019

@jbdoumenjou, i have the same issue with unhealthy services.
i expect to see 0
traefik_backend_server_up{backend="backend-whoami-1"} 0
but in fact backend service just disappaered from metrics if service is actually down.

traefik version: V1.7.9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/provider/marathon kind/bug/possible a possible bug that needs analysis before it is confirmed or fixed. priority/P2 need to be fixed in the future
Projects
None yet
Development

No branches or pull requests

8 participants