libvirt-exporter
libvirt-exporter copied to clipboard
Export node total CPUs, total memory. And node name as metric label
Hi, thanks for your PR! As I can see from libvirt documentation:
Use of this API is strongly discouraged as the information provided is not guaranteed to be accurate on all hardware platforms.
As I assume, for x86-64 this info should be OK for most users. But I would recommend using node-exporter to get information about the hypervisor node itself.
GetHostname probably requires qemu quest-agent to be installed. I've never used it in public clouds. If libvirt can't find a hostname it raises an error. We shouldn't fail metric collection if we cannot get guest hostname. We also don't need label with empty value. Maybe adding this metric to libvirt_domain_info_meta if it exists is enough?