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

feat(metric): add e2e test for volume filesystem readonly metrics #2108

Merged

Conversation

ChanYiLin
Copy link
Contributor

ref: longhorn/longhorn#8508

Export the metrics in the following form

  • metric name: longhorn_volume_file_system_read_only
  • type: gauge
  • if the volume becomes read-only, it has metric value 1 with the corresponding labels
    • So you know which volume is in read-only mode now
    • You can sum up the metrics to see how many volumes are in read-only mode now
# HELP longhorn_volume_file_system_read_only Volume whose mount point is in read-only mode
# TYPE longhorn_volume_file_system_read_only gauge
longhorn_volume_file_system_read_only{node="kworker1",pvc="nginx",pvc_namespace="default",volume="pvc-3a7a208b-c8c9-46a9-b2ce-4c5f740c8673"} 1

Note:
If Longhorn remounts the mount point to read-write successfully, the metrics will be cleaned up.
The metric is either 1 or no record for each volume

ref: longhorn/longhorn 8508

Signed-off-by: Jack Lin <jack.lin@suse.com>
@ChanYiLin
Copy link
Contributor Author

Hi @c3y1huang
The PR has been updated.
Thanks

@yangchiu yangchiu merged commit 7a45afb into longhorn:master Sep 23, 2024
5 of 6 checks passed
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.

3 participants