-
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
added md disks in down state #3007
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Finomosec <[email protected]>
… node_md_blocks_synced_pct Signed-off-by: Finomosec <[email protected]>
Signed-off-by: Finomosec <[email protected]>
Signed-off-by: Finomosec <[email protected]>
changed sync_minutes_remaining to sync_time_remaining (in seconds) Signed-off-by: Frederic <[email protected]>
fixed code formatting Signed-off-by: Frederic <[email protected]>
Signed-off-by: Finomosec <[email protected]>
Signed-off-by: Finomosec <[email protected]>
@SuperQ |
blockSyncedSpeedDesc = prometheus.NewDesc( | ||
prometheus.BuildFQName(namespace, "md", "blocks_synced_speed"), | ||
"current sync speed (in Kilobytes/sec)", | ||
[]string{"device"}, | ||
nil, | ||
) |
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 doesn't seem necessary, we should be able to compute this from something like rate(node_md_blocks_synced[1m]) * <blocksize>
.
blockSyncedSpeedDesc = prometheus.NewDesc( | |
prometheus.BuildFQName(namespace, "md", "blocks_synced_speed"), | |
"current sync speed (in Kilobytes/sec)", | |
[]string{"device"}, | |
nil, | |
) |
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 think it is usefull. It is the CURRENT speed, as it is shown in /stat/proc/mdstat
I have it showing in my Grafana board.
Plus i guess <blocksize>
is not included in the data, so it would require additional configuration for each md-device.
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.
My Grafana Board: https://grafana.com/grafana/dashboards/20989-node-exporter-mdadm-status/
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.
Note that the groundwork has already been laid for #1085, and we probably should not add any new parsing functionality relating to /proc/mdstat
.
Maybe instead of exposing the sync percent, we should expose the "TODO" blocks value. This way the completion ratio can be correctly calculated as |
renamed pct to percent Co-authored-by: Ben Kochie <[email protected]> Signed-off-by: Frederic <[email protected]>
added unit "seconds" Co-authored-by: Ben Kochie <[email protected]> Signed-off-by: Frederic <[email protected]>
That was my first idea, too, but the data-source (https://github.com/prometheus/procfs/blob/master/mdstat.go) does not (yet) capture/expose this value. Also But hey! We could calculate it using blocks_synced and the percentage. ... but it might be imprecise, especially for low percentage values plus it might yield slightly different results over time, which would be kind of akward. So maybe better not after all. I added a request to add it: |
Signed-off-by: Finomosec <[email protected]>
Yeah I agree, let's add the TODO blocks to procfs |
Released updated procfs: https://github.com/prometheus/procfs/releases/tag/v0.15.0 |
Added missing mdadm stats:
node_md_disks
# added{state="down"}
node_md_sync_time_remaining
(seconds)node_md_blocks_synced_speed
node_md_blocks_synced_pct
Notes:
state="down"
(recovering), which was not reported in the output.node_md_blocks_synced / node_md_blocks
as progress percentage created wrong results on my system, as the total-blocks differed from the total-to-be-synced-blocks. This may be due to the raid-level being used (raid5).