-
Notifications
You must be signed in to change notification settings - Fork 812
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: gauge missing statuses with zero #940
Conversation
@@ -19,6 +19,10 @@ class Services(object): | |||
BACKEND = 'BACKEND' | |||
FRONTEND = 'FRONTEND' | |||
ALL = (BACKEND, FRONTEND) | |||
ALL_STATUSES = ( | |||
'up', 'up_1/3', 'up_2/3', 'open', 'no_check', 'down', 'down_1/2', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do not consider up_x/y nor down_x/y
|
might want to remove "front-end" from the event name, that's confusing |
@remh should we default |
Do we need to have "HAProxy" in the event title? Seems a bit redundant with the haproxy logo right next to it |
good point, I'll remove it |
# Send the list of data to the metric and event callbacks | ||
self._process_metrics(data_dict, url) | ||
if process_events: | ||
self._process_event(data_dict, url) | ||
if process_events: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is that intentional ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, I thought that we don't want to have events on aggregates if we use the detail otherwise, and vice versa
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this way:
- use aggregates -> metrics and events for the aggregates
- don't use aggregates -> metrics and events detailed, without the noise of the aggregates
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great
Thanks @tmichelet ! Looks like the tests are failing though! Could you investigate and fix ? |
HAProxy: gauge missing statuses with zero
About count_per_status:
For each service, we currently only gauge the current status of the service.
This means that if the service was previously down and is up again, we are going to gauge(count, [up]) but not gauge(0, [down]).
Since on the UI the missing data is regressed, we can see this kind of bug:
The second chart keeps displaying 2, instead of displaying 0 where the value is missing.
This PR is about solving that, by always gauging each status (either count or 0, depending on the current status).
Pros: avoid these bugs
Cons: more data pushed, charts with only zeros appear
New charts: