mirror of
https://github.com/prometheus-community/smartctl_exporter.git
synced 2024-11-23 01:43:07 +01:00
Added disk form_factor meta label
The requirement from field engineers is knowledge of the form factor of the device, i.e. 3.5", 2.5" * updated EXAMPLE.md * fixed copy-paste issue `Starting systemd_exporter` Signed-off-by: Konstantin Shalygin <k0ste@k0ste.ru>
This commit is contained in:
parent
d3d5180048
commit
397a7a55f0
4 changed files with 500 additions and 731 deletions
1227
EXAMPLE.md
1227
EXAMPLE.md
File diff suppressed because it is too large
Load diff
2
main.go
2
main.go
|
@ -91,7 +91,7 @@ func main() {
|
|||
kingpin.Parse()
|
||||
logger := promlog.New(promlogConfig)
|
||||
|
||||
level.Info(logger).Log("msg", "Starting systemd_exporter", "version", version.Info())
|
||||
level.Info(logger).Log("msg", "Starting smartctl_exporter", "version", version.Info())
|
||||
level.Info(logger).Log("msg", "Build context", "build_context", version.BuildContext())
|
||||
|
||||
devices := *smartctlDevices
|
||||
|
|
|
@ -43,6 +43,7 @@ var (
|
|||
"firmware_version",
|
||||
"ata_version",
|
||||
"sata_version",
|
||||
"form_factor",
|
||||
},
|
||||
nil,
|
||||
)
|
||||
|
|
|
@ -109,6 +109,7 @@ func (smart *SMARTctl) mineDevice() {
|
|||
smart.json.Get("firmware_version").String(),
|
||||
smart.json.Get("ata_version.string").String(),
|
||||
smart.json.Get("sata_version.string").String(),
|
||||
smart.json.Get("form_factor.name").String(),
|
||||
)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue