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

Question: How to get frontend stats by host header? #76

Open
dsouzajude opened this issue Jun 20, 2018 · 0 comments
Open

Question: How to get frontend stats by host header? #76

dsouzajude opened this issue Jun 20, 2018 · 0 comments

Comments

@dsouzajude
Copy link

Hi, i'm looking for a way to monitor frontends by host header in HAProxy config where we route by host header. For example, consider the following config:

frontend http-in
    bind *:80
    log /dev/log    len 65535 local1 info
    capture request header User-Agent len 30
    capture request header X-Request-ID len 36
    capture request header Host len 32

    # Frontend rules for host header routing
    use_backend user if { hdr(Host) -i user user.example.com  }
    use_backend login if { hdr(Host) -i login login.example.com }


backend user
    mode http
    server-template user 10 _user._tcp.service.consul resolvers consul resolve-prefer ipv4 check

backend login
    mode http
    server-template login 10 _login._tcp.service.consul resolvers consul resolve-prefer ipv4 check

Is there a way to get stats of all frontends, for example in particular haproxy.frontend.response.4xx by header:Host?

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

No branches or pull requests

1 participant