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

Add failures_before_warning to checks #10969

Merged
merged 5 commits into from
Sep 14, 2021
Merged

Add failures_before_warning to checks #10969

merged 5 commits into from
Sep 14, 2021

Conversation

dnephin
Copy link
Contributor

@dnephin dnephin commented Aug 31, 2021

Closes #10701

I don't have permission to make changes on that remote, and CI was not running on that PR, so opening another one to get CI running.

jakubgs and others added 3 commits August 31, 2021 19:14
Signed-off-by: Jakub Sokołowski <jakub@status.im>
The new setting allows users to specify the number of check failures
that have to happen before a service status us updated to be `warning`.
This allows for more visibility for detected issues without creating
alerts and pinging administrators. Unlike the previous behavior, which
caused the service status to not update until it reached the configured
`failures_before_critical` setting, now Consul updates the Web UI view
with the `warning` state and the output of the service check when
`failures_before_warning` is breached.

The default value of `FailuresBeforeWarning` is the same as the value of
`FailuresBeforeCritical`, which allows for retaining the previous default
behavior of not triggering a warning.

When `FailuresBeforeWarning` is set to a value higher than that of
`FailuresBeforeCritical it has no effect as `FailuresBeforeCritical`
takes precedence.

Resolves: #10680

Signed-off-by: Jakub Sokołowski <jakub@status.im>
@github-actions github-actions bot added theme/api Relating to the HTTP API interface theme/config Relating to Consul Agent configuration, including reloading type/docs Documentation needs to be created/updated/clarified labels Aug 31, 2021
@hashicorp-ci
Copy link
Contributor

🤔 This PR has changes in the website/ directory but does not have a type/docs-cherrypick label. If the changes are for the next version, this can be ignored. If they are updates to current docs, attach the label to auto cherrypick to the stable-website branch after merging.

Our previous test values were not valid.

We just added a CheckType.Validate() call to config building, which now causes these invalid
checks to fail config testing.

This commit corrects the values to be valid checks.

Also move the Validate call for service checks into ServiceDefinition.Validate.
@vercel vercel bot temporarily deployed to Preview – consul-ui-staging September 1, 2021 16:44 Inactive
@vercel vercel bot temporarily deployed to Preview – consul September 1, 2021 16:44 Inactive
@vercel vercel bot temporarily deployed to Preview – consul September 1, 2021 16:46 Inactive
@vercel vercel bot temporarily deployed to Preview – consul-ui-staging September 1, 2021 16:46 Inactive
@dnephin dnephin requested a review from a team September 1, 2021 19:27
@kisunji kisunji self-assigned this Sep 7, 2021
@hashicorp-cla
Copy link

hashicorp-cla commented Sep 9, 2021

CLA assistant check
All committers have signed the CLA.

@kisunji kisunji merged commit 1f94796 into main Sep 14, 2021
@kisunji kisunji deleted the failures-before-warning branch September 14, 2021 16:47
@hc-github-team-consul-core
Copy link
Contributor

🍒 If backport labels were added before merging, cherry-picking will start automatically.

To retroactively trigger a backport after merging, add backport labels and re-run https://circleci.com/gh/hashicorp/consul/444028.

@jakubgs
Copy link
Contributor

jakubgs commented Sep 14, 2021

Thanks for fixing the test and CI issues @kisunji !

@kisunji
Copy link
Contributor

kisunji commented Sep 14, 2021

It was all @dnephin! I just pressed the merge button 😆

@jakubgs
Copy link
Contributor

jakubgs commented Sep 14, 2021

Thanks @dnephin then! Appreciate it. Now our alerts will be a bit less noisy, which is great.

Well, I guess I'll have to wait for a release to roll it out, but it's gonna be great.

@hc-github-team-consul-core
Copy link
Contributor

🍒 If backport labels were added before merging, cherry-picking will start automatically.

To retroactively trigger a backport after merging, add backport labels and re-run https://circleci.com/gh/hashicorp/consul/444828.

@hc-github-team-consul-core
Copy link
Contributor

🍒❌ Cherry pick of commit 1f94796 onto release/1.10.x failed! Build Log

@kisunji
Copy link
Contributor

kisunji commented Sep 15, 2021

☝️ Will manually cherry pick to make sure this goes into the next 1.10 release

@kisunji
Copy link
Contributor

kisunji commented Sep 16, 2021

Ah I may have misled everyone! Judging by Daniel's comments in the original PR (and the docs) this was meant for the next minor version 1.11 and not to be included in a patch for 1.10.x.

Expect to see this in our Consul 1.11 release! Sorry for the misunderstanding 😬

@jakubgs
Copy link
Contributor

jakubgs commented Sep 21, 2021

I've deployed v1.11.0-alpha to 12 hosts and set up few services with different values for failures_before_warning.

I'm seeing no issues so far.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
theme/api Relating to the HTTP API interface theme/config Relating to Consul Agent configuration, including reloading type/docs Documentation needs to be created/updated/clarified
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants