mirror of
https://github.com/prometheus-community/smartctl_exporter.git
synced 2024-12-21 02:21:55 +01:00
Pruned /dev/ prefix from device label
Now label matched with `node_exporter` labels Signed-off-by: Konstantin Shalygin <k0ste@k0ste.ru>
This commit is contained in:
parent
d3d5180048
commit
e385b4a351
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