mirror of
https://github.com/prometheus-community/smartctl_exporter.git
synced 2024-11-16 01:33:07 +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,
|
json: json,
|
||||||
logger: logger,
|
logger: logger,
|
||||||
device: SMARTDevice{
|
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()),
|
serial: strings.TrimSpace(json.Get("serial_number").String()),
|
||||||
family: strings.TrimSpace(json.Get("model_family").String()),
|
family: strings.TrimSpace(json.Get("model_family").String()),
|
||||||
model: strings.TrimSpace(json.Get("model_name").String()),
|
model: strings.TrimSpace(json.Get("model_name").String()),
|
||||||
|
|
Loading…
Reference in a new issue