New Feature: use serial number instead of block handle for drive stats#1946
Closed
TProhofsky wants to merge 1 commit intoprometheus:masterfrom
Closed
New Feature: use serial number instead of block handle for drive stats#1946TProhofsky wants to merge 1 commit intoprometheus:masterfrom
TProhofsky wants to merge 1 commit intoprometheus:masterfrom
Conversation
Member
|
Seems like a reasonable request but:
So instead it would propose:
|
Member
|
There are also a bunch of different udev aliases worth considering. There was a proposal a while back to map a Original issue: #304 We should probably open a new proposal issue to continue on the ideas from that thread. |
Member
|
Sadly, this isn't something we can use due to the issues above. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Managing disk metrics indexed by a temporary block device name currently causes many issue:
This change solves these issues by using udevadm to look up the drive serial number to replace the block device handle if available. Before the change the output looks like this:
' # HELP node_disk_read_bytes_total The total number of bytes read successfully.'
' # TYPE node_disk_read_bytes_total counter'
node_disk_read_bytes_total{device="sda"} 2.2736896e+07
node_disk_read_bytes_total{device="sdb"} 2.2736896e+07
node_disk_read_bytes_total{device="dm-0"} 1.630419968e+09
node_disk_read_bytes_total{device="sr0"} 0
node_disk_read_bytes_total{device="vda"} 1.682236416e+09
'# HELP node_disk_read_time_seconds_total The total number of seconds spent by all reads.'
'# TYPE node_disk_read_time_seconds_total counter'
node_disk_read_time_seconds_total{device="sda"} 0.499
node_disk_read_time_seconds_total{device="sdb"} 0.518
node_disk_read_time_seconds_total{device="dm-0"} 130.733
node_disk_read_time_seconds_total{device="sr0"} 0
node_disk_read_time_seconds_total{device="vda"} 132.032
`
After the change the output looks like this:
'# HELP node_disk_read_bytes_total The total number of bytes read successfully.'
'# TYPE node_disk_read_bytes_total counter'
node_disk_read_bytes_total{device="HLN03000"} 2.2736896e+07
node_disk_read_bytes_total{device="HLN03002"} 2.2736896e+07
node_disk_read_bytes_total{device="dm-0"} 1.630419968e+09
node_disk_read_bytes_total{device="sr0"} 0
node_disk_read_bytes_total{device="vda"} 1.682236416e+09
'# HELP node_disk_read_time_seconds_total The total number of seconds spent by all reads.'
'# TYPE node_disk_read_time_seconds_total counter'
node_disk_read_time_seconds_total{device="HLN03000"} 0.499
node_disk_read_time_seconds_total{device="HLN03002"} 0.518
node_disk_read_time_seconds_total{device="dm-0"} 130.733
node_disk_read_time_seconds_total{device="sr0"} 0
node_disk_read_time_seconds_total{device="vda"} 132.032
Updating the test fixtures is not included yet waiting for general agreement to proceed with change.