<div dir="auto">Hi Matthias,</div><div dir="auto"><br></div><div dir="auto">No worries about the answer timing, I’m busy too ;-)</div><div dir="auto"><br></div><div dir="auto">My use case isn’t for billing but for our projects to be able to get basic monitoring of their VMs without having to deploy yet another monitoring system additionally to what we already have.</div><div dir="auto"><br></div><div dir="auto">The problem with cpu shares is that I can’t get the host real cpu availability as we’re on a hyperconverged mode which have reserved ressources for storage.</div><div dir="auto"><br></div><div dir="auto">Currently we enabled the following extrastats:</div><div dir="auto"><br></div><div dir="auto">- perf</div><div dir="auto">- cpu_util</div><div dir="auto">- pcpu</div><div dir="auto">- vcpu</div><div dir="auto">- vcpupin</div><div dir="auto">- disk_err</div><div dir="auto">- job_stats_background</div><div dir="auto">- domaine_stats</div><div dir="auto"><br></div><div dir="auto">My problem with collectd metrics for now is more about the units than the data type as data type is well documented and/or exposed by the prometheus endpoint.</div><div dir="auto"><br></div><div dir="auto">For instance, those counters of cpu shares used that accumulate, are they amount of ns? Seconds? Instructions ? What type of units do they represents?</div><div dir="auto"><br></div><div dir="auto">Kind regards!</div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le sam. 11 sept. 2021 à 15:04, Matthias Runge <<a href="mailto:mrunge@matthias-runge.de">mrunge@matthias-runge.de</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)"><br>
<br>
> Am 09.09.2021 um 16:35 schrieb Gaël THEROND <<a href="mailto:gael.therond@bitswalk.com" target="_blank">gael.therond@bitswalk.com</a>>:<br>
> <br>
> Hi everyone,<br>
> <br>
> I'm currently building some monitoring pages for our Openstack platform.<br>
> To do so I leverage collectd with collectd-virt plugin and write_prometheus<br>
> plugin.<br>
> <br>
> Everything is fine, I'm receiving all metrics and I'm able to graph them<br>
> from Grafana using prometheus as our datasource.<br>
> <br>
> The only issue that I'm facing is to manipulate those metrics.<br>
> Our platform is CentOS 8 based and uses Collectd 5.11 provided by CentOS.<br>
> <br>
> The first issue that I've got is that few metrics labels exposed to<br>
> prometheus aren't listed in here or are having a different name (We do not<br>
> relabeled them yet): <a href="https://collectd.org/wiki/index.php/Plugin:virt" rel="noreferrer" target="_blank">https://collectd.org/wiki/index.php/Plugin:virt</a><br>
> <br>
> The second issue that I face is to find out the appropriate unit type of<br>
> those metrics as, yes, I've the data type, but are those float and int<br>
> expressing ms? ns? ms/s? time since epoch? or something else?<br>
> <br>
> Here are the problematic metrics:<br>
> collectd_virt_virt_cpu_total_total - prometheus type counter<br>
> collectd_virt_ps_cputime_user_total - prometheus type counter<br>
> collectd_virt_ps_cputime_syst_total - prometheus type counter<br>
<br>
Hi,<br>
<br>
Sorry for not getting back to you sooner.<br>
<br>
Since these metrics are total counters, I’d personally look only at differences over time.<br>
Are you using these values for billing purposes, like: your vm used<br>
14533 cpu cycles, that’ll be 43,23 €?<br>
<br>
> <br>
> Subsidiary question:<br>
> Is there any way to get the vm internal memory usage?<br>
> Because within the wiki page there is memory-rss etc but our collectd with<br>
> collectd-virt plugin is just exposing allocated memory.<br>
> <br>
<br>
I would think we are exposing these metrics, but didn’t check lately. In any case, I<br>
See value in having those metrics.<br>
What kind of extrastats config do you use? See <a href="https://github.com/collectd/collectd/blob/main/src/collectd.conf.pod#plugin-virt" rel="noreferrer" target="_blank">https://github.com/collectd/collectd/blob/main/src/collectd.conf.pod#plugin-virt</a><br>
You can pass the memory option.<br>
<br>
Matthias<br>
<br>
> Additional information:<br>
> OS Version: CentOS 8.4.2105<br>
> Kernel: 4.18.0-305.7.1<br>
> Collectd: 5.11.0-2<br>
> Collectd-virt: 5.11.0-2<br>
> Collectd-write_prometheus: 5.11.0-2<br>
> <br>
> Feel free to tell me if I missed something important.<br>
> Cheers!<br>
> _______________________________________________<br>
> collectd mailing list<br>
> <a href="mailto:collectd@verplant.org" target="_blank">collectd@verplant.org</a><br>
> <a href="https://mailman.verplant.org/listinfo/collectd" rel="noreferrer" target="_blank">https://mailman.verplant.org/listinfo/collectd</a><br>
<br>
</blockquote></div></div>