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

ceph: fix 'CephMonQuorumLost' alert #9068

Merged
merged 1 commit into from Nov 2, 2021

Conversation

aruniiird
Copy link
Contributor

Only the 'Running' mons with result value of '1' should be counted.

Signed-off-by: Arun Kumar Mohan amohan@redhat.com

Description of your changes:

Which issue is resolved by this Pull Request:
Resolves #

Checklist:

  • Commit Message Formatting: Commit titles and messages follow guidelines in the developer guide.
  • Skip Tests for Docs: Add the flag for skipping the build if this is only a documentation change. See here for the flag.
  • Skip Unrelated Tests: Add a flag to run tests for a specific storage provider. See test options.
  • Reviewed the developer guide on Submitting a Pull Request
  • Documentation has been updated, if necessary.
  • Unit tests have been added, if necessary.
  • Integration tests have been added, if necessary.
  • Pending release notes updated with breaking and/or notable changes, if necessary.
  • Upgrade from previous release is tested and upgrade user guide is updated, if necessary.
  • Code generation (make codegen) has been run to update object specifications, if necessary.

@aruniiird
Copy link
Contributor Author

/assign @leseb

@aruniiird aruniiird requested a review from leseb October 29, 2021 13:30
Only the 'Running' mons with result value of '1' should be counted.

Signed-off-by: Arun Kumar Mohan <amohan@redhat.com>
Copy link
Member

@leseb leseb left a comment

Choose a reason for hiding this comment

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

please use monitoring as a commit prefix

@aruniiird aruniiird force-pushed the fix-CephMonQuorumLost-alert-query branch from f5df591 to af44e5c Compare November 2, 2021 13:04
@@ -90,7 +90,7 @@ spec:
severity_level: critical
storage_type: ceph
expr: |
count(kube_pod_status_phase{pod=~"rook-ceph-mon-.*", phase=~"Running|running"}) by (namespace) < 2
count(kube_pod_status_phase{pod=~"rook-ceph-mon-.*", phase=~"Running|running"} == 1) by (namespace) < 2
Copy link
Member

Choose a reason for hiding this comment

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

Doesn't the < 2 already cover the == 1 case?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

image

In the above example, we can see that if pod is in running phase value is 1 (at the right end). But if the pod is not running, the value is ZERO. So we have to collect / count pods which are in valid running state, that means the value is ONE.

@travisn travisn merged commit cbe29ba into rook:master Nov 2, 2021
mergify bot added a commit that referenced this pull request Nov 2, 2021
ceph: fix 'CephMonQuorumLost' alert (backport #9068)
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.

None yet

3 participants