mirror of
https://github.com/prometheus/node_exporter.git
synced 2024-11-09 23:24:09 -08:00
b6215e649c
Currently Node Exporter has a metric called `node_uname_info` which of course exposes uname info. While this is nice, it does not help if you are running different OSes which could have similar uname info. Therefore parse `/etc/os-release` or `/usr/lib/os-release` and expose a `node_os_info` metric which provide information regarding the OS release/version of the node. Also expose the major.minor part of the OS release version as `node_os_version`. Since the os-release files will not change often, cache the parsed content and only refresh the cache if the modification time changes. This `os` collector will read files outside of `/proc` and `/sys`, but the os-release file is widely used and the format is standardized: https://www.freedesktop.org/software/systemd/man/os-release.html Bug: https://github.com/prometheus/node_exporter/issues/1574 Signed-off-by: Benjamin Drung <benjamin.drung@ionos.com>
29 lines
1.2 KiB
Modula-2
29 lines
1.2 KiB
Modula-2
module github.com/prometheus/node_exporter
|
|
|
|
require (
|
|
github.com/beevik/ntp v0.3.0
|
|
github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf
|
|
github.com/ema/qdisc v0.0.0-20200603082823-62d0308e3e00
|
|
github.com/go-kit/log v0.1.0
|
|
github.com/godbus/dbus v0.0.0-20190402143921-271e53dc4968
|
|
github.com/hashicorp/go-envparse v0.0.0-20200406174449-d9cfd743a15e
|
|
github.com/hodgesds/perf-utils v0.2.5
|
|
github.com/illumos/go-kstat v0.0.0-20210513183136-173c9b0a9973
|
|
github.com/jsimonetti/rtnetlink v0.0.0-20210713125558-2bfdf1dbdbd6
|
|
github.com/lufia/iostat v1.1.0
|
|
github.com/mattn/go-xmlrpc v0.0.3
|
|
github.com/mdlayher/wifi v0.0.0-20200527114002-84f0b9457fdd
|
|
github.com/prometheus/client_golang v1.11.0
|
|
github.com/prometheus/client_model v0.2.0
|
|
github.com/prometheus/common v0.29.0
|
|
github.com/prometheus/exporter-toolkit v0.6.0
|
|
github.com/prometheus/procfs v0.7.2
|
|
github.com/safchain/ethtool v0.0.0-20210803160452-9aa261dae9b1
|
|
github.com/siebenmann/go-kstat v0.0.0-20210513183136-173c9b0a9973 // indirect
|
|
github.com/soundcloud/go-runit v0.0.0-20150630195641-06ad41a06c4a
|
|
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c
|
|
gopkg.in/alecthomas/kingpin.v2 v2.2.6
|
|
)
|
|
|
|
go 1.14
|