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

Added HealthyHostCount alarm #5

Merged
merged 3 commits into from
Mar 16, 2022
Merged

Conversation

tovbinm
Copy link
Contributor

@tovbinm tovbinm commented Mar 16, 2022

No description provided.

@lorenzoaiello
Copy link
Owner

Hey @tovbinm - Thanks for the PR.

Just curious - what's the use case for having an alarm fire when the healthy host count is greater than zero? I could see one in case the healthy host count equals zero.

@tovbinm
Copy link
Contributor Author

tovbinm commented Mar 16, 2022

Unfortunately UnHealthyHostCount metrics does not capture the case where a host (e.g. ECS Container) fails to start, since it never reaches Unhealthy state. Instead the container just bounces from Initial to Draining - https://docs.aws.amazon.com/elasticloadbalancing/latest/application/target-group-health-checks.html#target-health-states

Using HealthyHostCount lets you capture this.

@lorenzoaiello
Copy link
Owner

Gotcha, but in that scenario wouldn't you want to use LessThanOrEqualToThreshold 0 instead of GreaterThanThreshold 0?

@lorenzoaiello
Copy link
Owner

lgtm - thanks for the fix.

@lorenzoaiello lorenzoaiello merged commit 209384f into lorenzoaiello:master Mar 16, 2022
@tovbinm
Copy link
Contributor Author

tovbinm commented Mar 16, 2022

Thanks @lorenzoaiello !

It's also worth mentioning in the README that target_group_id and load_balancer_id should be set to use tg.arn_suffix and lb.arn_suffix respectively - e.g [1] and [2]

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

Successfully merging this pull request may close these issues.

2 participants