Add IO stats and ext4 FS stats through new ext4 collector#3047
Add IO stats and ext4 FS stats through new ext4 collector#3047mshahzeb wants to merge 17 commits intoprometheus:masterfrom
Conversation
|
Sample generated metrics file |
|
This would be wonderful to have as a feature |
|
Hi @mshahzeb, thanks for looking into this! This is a great start, we now know which files to read.
|
|
Thank you I will be moving the code to procfs and open a PR there. |
|
PR in the works on procfs: prometheus/procfs#651 |
|
Procfs PR merged: prometheus/procfs#651 |
|
Waiting for new procfs release |
|
You can also use the unreleased version for now |
- Updated diskstats_linux.go to replace log.Debug with slog.Logger for error logging. - Modified ext4_linux.go to change logger type from log.Logger to *slog.Logger in the ext4Collector struct and NewExt4Collector function signature.
- Included ext4 in the list of enabled collectors in end-to-end tests. - Added additional metrics for disk I/O operations in diskstats_linux.go and updated corresponding test fixtures. - Enhanced error handling for reading I/O counts in diskstats collector.
- Removed unused device metrics from diskstats_linux_test.go and corresponding e2e fixture. - Added new metrics for completed and errored I/O commands for devices sda and sr0 in both test and fixture files. - Updated sys.ttar to include new I/O count paths for devices sda and sr0.
|
Closing this PR; new PR opened at: #3295 |
Fixes: #3005
Adds:
From
/sys/fs/ext4/<partition>/errors_count: number of ext4 errors (commit)/sys/fs/ext4/<partition>/warning_count: number of ext4 warning log messages (commit)/sys/fs/ext4/<partition>/msg_count: number of other ext4 log messagesand
From
/sys/block/<disk>/device/ioerr_cnt: number of SCSI commands that completed with an error/sys/block/<disk>/device/iodone_cnt: number of completed or rejected SCSI commandsImplements new
ext4collector.Corresponding procfs changes: prometheus/procfs#651