prometheus / prometheus/node_exporter

Ability to resolve device mapper to drive name

Open
#3,257 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
13.8k
Forks
2.7k
Avg merge
1d 23h
Merged PRs (30d)
8

Description

My goal is to somehow get from the btrfs_dev_uuid to the serial number of the drive. I already can map to the device mapper name (node_disk_device_mapper_info{name}), but currently I did not find a way from getting from a value like dm-4 to sda where I then could use some other metric to map from sda to the serial.

I need this for a dashboard which should display which of my btrfs raid devices are broken. The best thing for me would be to somehow display which serial is broken as my drives are labeled with the serial.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start from the node_disk_device_mapper_info metric and investigate how node_exporter could map a device such as dm-4 to its underlying drive and serial number. Confirm the available Linux device-mapper and btrfs information, then verify that the resulting metrics can identify the serial of a broken RAID device for the dashboard use case.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, linux
Domain
observability-sre, operating-systems
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.