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

Fire SsaCLIControllerNotOK only if status is not OK and not NOT CONFIGURED #373

Merged
merged 2 commits into from
Dec 13, 2024

Conversation

Deezzir
Copy link
Contributor

@Deezzir Deezzir commented Dec 12, 2024

Fixes: #354

@Deezzir Deezzir merged commit cbafe4f into canonical:main Dec 13, 2024
10 checks passed
@Deezzir Deezzir deleted the SOLENG-928 branch December 13, 2024 01:30
@@ -27,7 +27,7 @@ groups:
LABELS = {{ $labels }}

- alert: SsaCLIControllerNotOK
expr: ssacli_controller_info{status != "OK"} == 1
expr: ssacli_controller_info{status != "OK", status!="NOT CONFIGURED"} == 1
Copy link
Member

@gabrielcocenza gabrielcocenza Dec 13, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not a valid Promql expression.

I will revert this PR.

Please, also add unit tests using the promtool

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is a valid expression, I tested it

Copy link
Member

@gabrielcocenza gabrielcocenza Dec 13, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How did you test this?

image

It won't break the query, but it always will return empty.
As far as I know you can't use two times status and expect this kind of behavior

You need to use regular expression and just use status once

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See #376

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested with the same unit test you provided, I just didn't add it to the PR

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incredibly it pass the unit tests if I set the NOT CONFIGURED. However this is very likely a promtool bug that we should file.

As showed above this kind of query will always return empty in Prometheus so it's useless in a real scenario

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.

SsaCLIControllerNotOK unnecessarily reports severity=critical for status=NOT CONFIGURED
4 participants