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:
Konstantin Shalygin 2022-10-14 17:48:26 +07:00
parent d3d5180048
commit 397a7a55f0
4 changed files with 500 additions and 731 deletions

1227
EXAMPLE.md

File diff suppressed because it is too large Load diff

View file

@ -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

View file

@ -43,6 +43,7 @@ var (
"firmware_version",
"ata_version",
"sata_version",
"form_factor",
},
nil,
)

View file

@ -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(),
)
}