Export node total CPUs, total memory. And node name as metric label#37
Export node total CPUs, total memory. And node name as metric label#37trublast wants to merge 2 commits intoTinkoff:masterfrom
Conversation
|
Hi, thanks for your PR! As I assume, for x86-64 this info should be OK for most users. But I would recommend using 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 |
| if err != nil { | ||
| return err | ||
| } | ||
| autostart_int := 0 |
There was a problem hiding this comment.
Let's convert it to float64 here, there's no need in double conversion.
There was a problem hiding this comment.
Hello.
GetHostname in this case returns hypervisor name (see here). I agree with you, it's enough to store data in the libvirt info_meta, but it's hard to use in alerts or dashboards with grouping or searching by hypervisor name. For most cases this is the same as instance, but human readable.
About NodeGetInfo. The number of hypervisor CPUs and total memory are the minimum information to generate "oversell" alerts. I dont't want to install node-exporter on each hypervisor only for it. It seemed like a good idea to pass this information from the libvirt-exporter
And of course I want to say that I am not a Go programmer. I just wanted to add functionality to monitoring my servers. My code was written with Ctrl+C/Ctrl+V.

No description provided.