mirror of
https://github.com/prometheus-community/smartctl_exporter.git
synced 2024-12-21 02:21:55 +01:00
Merge pull request #88 from k0ste/help3
Pruned /dev/ prefix from device label
This commit is contained in:
commit
3a8968a04a
1 changed files with 1 additions and 1 deletions
|
@ -46,7 +46,7 @@ func NewSMARTctl(logger log.Logger, json gjson.Result, ch chan<- prometheus.Metr
|
|||
json: json,
|
||||
logger: logger,
|
||||
device: SMARTDevice{
|
||||
device: strings.TrimSpace(json.Get("device.name").String()),
|
||||
device: strings.TrimPrefix(strings.TrimSpace(json.Get("device.name").String()), "/dev/"),
|
||||
serial: strings.TrimSpace(json.Get("serial_number").String()),
|
||||
family: strings.TrimSpace(json.Get("model_family").String()),
|
||||
model: strings.TrimSpace(json.Get("model_name").String()),
|
||||
|
|
Loading…
Reference in a new issue