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
MaaS: Disable alarms/checks with regex #1691
Conversation
It seems we should probably support regex so we can disable alarms per subset of host or very specifically rather than just disabling all alarms of a given name |
That's a decent idea, @BjoernT. I guess we could make |
I like that idea @BjoernT. @major For alarms that are included in the list, will the alarm still be included in the server-side yaml or will it iterate over and be excluded? If excluded, one thing that comes to mind is if a yaml were to include only check and no alarm definition, it could be portrayed that it's not in-use and may be subject to be deleted by a member of support (this is an education piece). It may be worth noting that alarms section within the yaml definition can also have a |
1df8676
to
de5daac
Compare
Let me know how this patch looks. I've only applied it to one of the checks. |
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 looks better :D
@@ -6,6 +6,7 @@ timeout : "{{ maas_check_timeout }}" | |||
alarms : | |||
idle_percent_average : | |||
label : idle_percent_average--{{ inventory_hostname|quote }} | |||
disabled : {{ idle_percent_average | match(maas_excluded_alarms_regex) | ternary('true', 'false') }} |
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.
Really wish the maas agent didn't make us use double negatives.
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.
I don't understand why we can't fix this.
Oof, I have some "order of operations" issues going on here. |
de5daac
to
f01c1b1
Compare
recheck_ceph Ceph mirrors have some shenanigans. |
df26d1b
to
4e79469
Compare
This patch allows for regular expressions to be used in the `maas_excluded_checks` variable. It also adds `maas_excluded_alarms` and allows deployers to use a regular expression to exclude **only** alarms for a particular check. The check itself (and any related graphing) is maintained. This comes from a discussion in rcbops/u-suk-dev#948 where some of the checks are good to have, but the alarms aren't needed. Connects rcbops/u-suk-dev#1019
4e79469
to
d9ec02c
Compare
I take your word that you have heavily tested, I don't have the cycles for it now. So thanks and 👍 |
This patch allows for regular expressions to be used in the
maas_excluded_checks
variable.It also adds
maas_excluded_alarms
and allows deployers to use aregular expression to exclude only alarms for a particular check.
The check itself (and any related graphing) is maintained.
This comes from a discussion in rcbops/u-suk-dev#948 where some of the
checks are good to have, but the alarms aren't needed.
Connects rcbops/u-suk-dev#1019