mirror of
				https://github.com/prometheus/node_exporter.git
				synced 2025-08-20 18:33:52 -07:00 
			
		
		
		
	Change raid0 status line regexp for mdadm collector (#619)
This commit is contained in:
		
							parent
							
								
									971de21945
								
							
						
					
					
						commit
						1369763067
					
				|  | @ -905,6 +905,7 @@ node_md_blocks{device="md00"} 4.186624e+06 | |||
| node_md_blocks{device="md10"} 3.14159265e+08 | ||||
| node_md_blocks{device="md11"} 4.190208e+06 | ||||
| node_md_blocks{device="md12"} 3.886394368e+09 | ||||
| node_md_blocks{device="md126"} 1.855870976e+09 | ||||
| node_md_blocks{device="md127"} 3.12319552e+08 | ||||
| node_md_blocks{device="md219"} 7932 | ||||
| node_md_blocks{device="md3"} 5.853468288e+09 | ||||
|  | @ -920,6 +921,7 @@ node_md_blocks_synced{device="md00"} 4.186624e+06 | |||
| node_md_blocks_synced{device="md10"} 3.14159265e+08 | ||||
| node_md_blocks_synced{device="md11"} 4.190208e+06 | ||||
| node_md_blocks_synced{device="md12"} 3.886394368e+09 | ||||
| node_md_blocks_synced{device="md126"} 1.855870976e+09 | ||||
| node_md_blocks_synced{device="md127"} 3.12319552e+08 | ||||
| node_md_blocks_synced{device="md219"} 7932 | ||||
| node_md_blocks_synced{device="md3"} 5.853468288e+09 | ||||
|  | @ -935,6 +937,7 @@ node_md_disks{device="md00"} 1 | |||
| node_md_disks{device="md10"} 2 | ||||
| node_md_disks{device="md11"} 2 | ||||
| node_md_disks{device="md12"} 2 | ||||
| node_md_disks{device="md126"} 2 | ||||
| node_md_disks{device="md127"} 2 | ||||
| node_md_disks{device="md219"} 0 | ||||
| node_md_disks{device="md3"} 8 | ||||
|  | @ -950,6 +953,7 @@ node_md_disks_active{device="md00"} 1 | |||
| node_md_disks_active{device="md10"} 2 | ||||
| node_md_disks_active{device="md11"} 2 | ||||
| node_md_disks_active{device="md12"} 2 | ||||
| node_md_disks_active{device="md126"} 2 | ||||
| node_md_disks_active{device="md127"} 2 | ||||
| node_md_disks_active{device="md219"} 0 | ||||
| node_md_disks_active{device="md3"} 8 | ||||
|  | @ -965,6 +969,7 @@ node_md_is_active{device="md00"} 1 | |||
| node_md_is_active{device="md10"} 1 | ||||
| node_md_is_active{device="md11"} 1 | ||||
| node_md_is_active{device="md12"} 1 | ||||
| node_md_is_active{device="md126"} 1 | ||||
| node_md_is_active{device="md127"} 1 | ||||
| node_md_is_active{device="md219"} 0 | ||||
| node_md_is_active{device="md3"} 1 | ||||
|  |  | |||
|  | @ -37,6 +37,9 @@ md11 : active (auto-read-only) raid1 sdb2[0] sdc2[1] | |||
| md12 : active raid0 sdc2[0] sdd2[1] | ||||
|       3886394368 blocks super 1.2 512k chunks | ||||
| 
 | ||||
| md126 : active raid0 sdb[1] sdc[0] | ||||
|       1855870976 blocks super external:/md127/0 128k chunks | ||||
| 
 | ||||
| md219 : inactive sdb[2](S) sdc[1](S) sda[0](S) | ||||
|     7932 blocks super external:imsm | ||||
| 
 | ||||
|  |  | |||
|  | @ -29,7 +29,7 @@ import ( | |||
| 
 | ||||
| var ( | ||||
| 	statuslineRE             = regexp.MustCompile(`(\d+) blocks .*\[(\d+)/(\d+)\] \[[U_]+\]`) | ||||
| 	raid0lineRE              = regexp.MustCompile(`(\d+) blocks( super ([0-9\.])*)? \d+k chunks`) | ||||
| 	raid0lineRE              = regexp.MustCompile(`(\d+) blocks .*\d+k chunks`) | ||||
| 	buildlineRE              = regexp.MustCompile(`\((\d+)/\d+\)`) | ||||
| 	unknownPersonalityLineRE = regexp.MustCompile(`(\d+) blocks (.*)`) | ||||
| 	raidPersonalityRE        = regexp.MustCompile(`raid[0-9]+`) | ||||
|  |  | |||
|  | @ -36,6 +36,7 @@ func TestMdadm(t *testing.T) { | |||
| 		"md10":  {"md10", true, 2, 2, 314159265, 314159265}, | ||||
| 		"md11":  {"md11", true, 2, 2, 4190208, 4190208}, | ||||
| 		"md12":  {"md12", true, 2, 2, 3886394368, 3886394368}, | ||||
| 		"md126": {"md126", true, 2, 2, 1855870976, 1855870976}, | ||||
| 		"md219": {"md219", false, 0, 0, 7932, 7932}, | ||||
| 		"md00":  {"md00", true, 1, 1, 4186624, 4186624}, | ||||
| 	} | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue