-
Notifications
You must be signed in to change notification settings - Fork 2.6k
feat: add SystemdVirtualization type #3254
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
5682be5 to
9755b52
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor nits.
|
Hey @SuperQ, Suggestion applied. When you have a moment, could you please take another look and let me know if everything looks good?, thanks a million! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
5cf89c1 to
49fc8ef
Compare
Signed-off-by: IbraAoad <[email protected]>
Co-authored-by: Ben Kochie <[email protected]> Signed-off-by: Ibrahim Awwad <[email protected]> Signed-off-by: IbraAoad <[email protected]>
Signed-off-by: Mikel Olasagasti Uranga <[email protected]> Signed-off-by: IbraAoad <[email protected]>
Signed-off-by: Alexander Soelberg Heidarsson <[email protected]> Signed-off-by: IbraAoad <[email protected]>
…rface Signed-off-by: IbraAoad <[email protected]>
Signed-off-by: IbraAoad <[email protected]>
c811df1 to
fa72170
Compare
|
Hey @SuperQ , Thanks a million, would it be possible to get this merged anytime you have a minute? |
* [CHANGE] mdadm: Use sysfs for RAID metrics #3031 * [CHANGE] filesystem: Add erofs in default excluded fs #3313 * [CHANGE] tcpstat: Use std lib binary.NativeEndian #3386 * [FEATURE] pcidevice: Add new collector for PCIe devices #3339 * [FEATURE] AIX: Add more metrics #3338 * [FEATURE] systemd: Add Virtualization metrics #3254 * [FEATURE] swaps: Add new collector #3428 * [ENHANCEMENT] filesystem: Take super options into account for read-only #3387 * [ENHANCEMENT] perf: Add tlb_data metrics #3436 * [BUGFIX] interrupts: Fix OpenBSD interrupt device parsing #3288 * [BUGFIX] diskstats: Simplify condition #3290 * [BUGFIX] thermal: Sanitize darwin thermal strings #3294 * [BUGFIX] filesystem: Fix Darwin collector cgo memory leak #3315 * [BUGFIX] ethtool: Fix returning 0 for sanitized metrics #3335 * [BUGFIX] netdev: Fix Darwin netdev i/o bytes metric #3336 * [BUGFIX] systemd: Fix logging race #3364 * [BUGFIX] filesystem: Fix duplicate Darwin CGO import #3391 Signed-off-by: Ben Kochie <[email protected]>
* [CHANGE] mdadm: Use sysfs for RAID metrics #3031 * [CHANGE] filesystem: Add erofs in default excluded fs #3313 * [CHANGE] tcpstat: Use std lib binary.NativeEndian #3386 * [FEATURE] pcidevice: Add new collector for PCIe devices #3339 * [FEATURE] AIX: Add more metrics #3338 * [FEATURE] systemd: Add Virtualization metrics #3254 * [FEATURE] swaps: Add new collector #3428 * [ENHANCEMENT] filesystem: Take super options into account for read-only #3387 * [ENHANCEMENT] perf: Add tlb_data metrics #3436 * [BUGFIX] interrupts: Fix OpenBSD interrupt device parsing #3288 * [BUGFIX] diskstats: Simplify condition #3290 * [BUGFIX] thermal: Sanitize darwin thermal strings #3294 * [BUGFIX] filesystem: Fix Darwin collector cgo memory leak #3315 * [BUGFIX] ethtool: Fix returning 0 for sanitized metrics #3335 * [BUGFIX] netdev: Fix Darwin netdev i/o bytes metric #3336 * [BUGFIX] systemd: Fix logging race #3364 * [BUGFIX] filesystem: Fix duplicate Darwin CGO import #3391 Signed-off-by: Ben Kochie <[email protected]>
* [CHANGE] mdadm: Use sysfs for RAID metrics #3031 * [CHANGE] filesystem: Add erofs in default excluded fs #3313 * [CHANGE] tcpstat: Use std lib binary.NativeEndian #3386 * [FEATURE] pcidevice: Add new collector for PCIe devices #3339 * [FEATURE] AIX: Add more metrics #3338 * [FEATURE] systemd: Add Virtualization metrics #3254 * [FEATURE] swaps: Add new collector #3428 * [ENHANCEMENT] filesystem: Take super options into account for read-only #3387 * [ENHANCEMENT] perf: Add tlb_data metrics #3436 * [BUGFIX] interrupts: Fix OpenBSD interrupt device parsing #3288 * [BUGFIX] diskstats: Simplify condition #3290 * [BUGFIX] thermal: Sanitize darwin thermal strings #3294 * [BUGFIX] filesystem: Fix Darwin collector cgo memory leak #3315 * [BUGFIX] ethtool: Fix returning 0 for sanitized metrics #3335 * [BUGFIX] netdev: Fix Darwin netdev i/o bytes metric #3336 * [BUGFIX] systemd: Fix logging race #3364 * [BUGFIX] filesystem: Fix duplicate Darwin CGO import #3391 Signed-off-by: Ben Kochie <[email protected]>
Issue
Node Exporter does not expose the system's virtualization state, limiting visibility into whether a host is running on bare metal or under virtualization.
Solution
This PR adds a new gauge metric with a label
virtualization_typeto indicate the system’s virtualization type (e.g., "kvm", "none", or "unknown"), retrieved via a DBus query from systemd.Metric examples:
Context
Systemd dbus allows querying system's virtualization via
readonly s Virtualization.For better reporting, empty string indicating bare-metal is mapped to
nonein this PR anddbusquery errors are mapped tounkown.Testing
Manual testing was also performed on a multipass vm using
KVMon linux with node-exporter running inside of it and systemd collector enabled./node_exporter --collector.systemd