-
Notifications
You must be signed in to change notification settings - Fork 814
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
[haproxy] Count available/unavailable backends #1915
Conversation
i think another problem is that in busy environments, the number of tags on the in our environment, the it might be nice to create a totally separate metric, like |
e1ced7a
to
86ec4e1
Compare
because the logic appears mostly lifted from the status counting function, it still suffers from the problem that we're going to be including the backend itself in the counts and not just the hosts in the backend. that is, if there are 2 hosts in a backend that are both up, we're going to end up reporting 3 hosts as up (2 hosts + the backend) instead of two hosts not sure how to counter that; maybe for the backend the hostname is null or something? need to dig a little deeper. |
86ec4e1
to
e44689d
Compare
I've read the code and the weirdest part I've found is this https://github.com/DataDog/dd-agent/blob/master/checks.d/haproxy.py#L212 |
e44689d
to
2ce02e3
Compare
07549d4
to
a4b4b38
Compare
The count_per_status currently counts both backends and frontends. An important query is how many backends are available or unavailable disregarding the big set of tags, which causes the typeaheads in the datadog ui to never load. In order to achieve this, a new counter 'haproxy.backend_hosts' is added. It has two tags: service and available. The latter is either true or false.
8defaff
to
54e8949
Compare
54e8949
to
6c7019e
Compare
Igor, it seems that the code is ok now. There are 3 main comments:
I previously thought that we had a problem with the case of the word BACKEND but after double checking this is not the case at the dd-agent level. We just need to update the version of the agent in our side. Furthermore, when we use the change of this PR internally we will be discarding correctly the BACKEND. The tests pass on Travis |
@remh, this is ready to be reviewed |
@a20012251 the agent team will review this shortly, the goal is to release it with 5.6 |
thanks! |
It looks good to me thnaks a lot @a20012251 and @igor47 |
[haproxy] Count available/unavailable backends
The count_per_status currently counts both backends and frontends. An
important query is how many backends are available or unavailable
disregarding the big set of tags, which causes the typeaheads in the
datadog ui to never load.
In order to achieve this, a new counter 'haproxy.backend_hosts' is added.
It has two tags: service and available. The latter is either true or
false.