-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
collectors/mdadm_linux: support reshape status + expose remaining mdstats #3163
base: master
Are you sure you want to change the base?
Conversation
cca725b
to
0bae5cf
Compare
collector/mdadm_linux.go
Outdated
@@ -98,6 +104,31 @@ var ( | |||
[]string{"device"}, | |||
nil, | |||
) | |||
|
|||
blocksToBeSyncedDesc = prometheus.NewDesc( | |||
prometheus.BuildFQName(namespace, "md", "blocks_tobesynced"), |
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.
why not to_be_synced? Seems better
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.
Updated :)
collector/mdadm_linux.go
Outdated
nil, | ||
) | ||
blocksSyncedPctDesc = prometheus.NewDesc( | ||
prometheus.BuildFQName(namespace, "md", "blocks_synced_pct"), |
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.
Ideally we would have a blocks_synced so this can be calculated from blocks_to_by_synced
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.
No need to calculate anything, since we already have blocks_synced
. I just added this bit, so all available data is exported (and it's one thing less to manually calculate later on in PromQL).
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.
Ah I missed this. In that case just remove the blocks_synced_pct. This can be easily and cheaply calculated in PromQL and therefor is best practice to not expose it
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.
Removed with e86fd7f
f50c7a0
to
e86fd7f
Compare
…tats Signed-off-by: Philipp Born <[email protected]>
e86fd7f
to
fc1f2bb
Compare
Requires prometheus/procfs#679
This change allows the mdadm collector to properly catch raids that are currently undergoing conversion (reshaping), i.e. from RAID1 to RAID5.
Additionally, it also exposes the remaining stats like sync speed / percentage, etc.