Univention Bugzilla – Bug 15757
Collect UVMM and UCS statistics with collectd (or MRTG)
Last modified: 2020-07-03 20:54:20 CEST
Das UMC-Modul zur Auslastungsstatistik: Mögliche Verbesserungen (ggf. in einzelne Bugs aufteilen): - evtl. ein Verzeichnis je Kategorie (load, terminalserver-sessions etc.) - direkten Zugriff per Webserver nur authentifiziert zulassen - zusätzliche Grafiken für * Plattenauslastung je Partition, Swap * Datentransfers: Platte/Netzwerk je Device * ...
Please also have a look at collectd <https://collectd.org/>, which is also cappable of collection statistics locally, but can store the in local rrd-files and/or send them over the network to a (central) logging server. I'd like to investigate how that could be integrated with UVMM, since currently one of the most missed features for me is missing data: Each time I need to create a new VM, I have no idea how loaded the servers are: Therefore I would like to know how much - free hard disk space - free RAM - VM per # CPUs there are. As logging to RRD files is IO intensive (lots of random writes), I would prefer the VM servers to send there data to the server running UVMMd, where the data would be readily available for Web consumption. (collectd has a nice feature for sending the data to a multicast address, which makes adding new servers really easy <https://collectd.org/wiki/index.php/Networking_introduction#Basic_multicast_setup>).
Created attachment 5338 [details] Collect libvirt statistics The attached script collects CPU and memory usage statistics directly from libvirt: python ./uvmm-rrd.py c & # for 'c'ollect It collects the data in uvmm.rrd. To generate the graphs: python ./uvmm-rrd.py gc # for 'C'PU 'g'raph python ./uvmm-rrd.py gm # for 'm'emory 'g'raph Successfully tested on xen12 with qemu-kvm-1.1 on UCS-3.2~. The generated PNGs could be directly displayed in UMC, but need to be re-generated regularly (on demand). Therefore it might be better to use the native Dojo charting: <http://dojotoolkit.org/documentation/tutorials/1.8/charting/>
Created attachment 5342 [details] Sample Tape Archive rrdtool-1.4.7 kann auch JSON exportieren (allerdings kaputt, siehe Debian Bug 686825), daß man anschließend per <http://dojotoolkit.org/documentation/tutorials/1.8/charting/> auswerten lässt. Patches for rrdtool-1.4.7: bts686825-json xport-end xport-escape uvmm-rrd.py: Collect data (and generate graph once) uvmm-cpu, uvmm-mem: CGI-Scripts to export RRD data as JSON → /usr/lib/cgi-bin/ uvmm.html: Load JSON vir XHR from Server and plot using dojo.chart uvmm-local.html: Debugging variant using local files
This issue has been filed against UCS 2.3. UCS 2.3 is out of maintenance and many UCS components have vastly changed in later releases. Thus, this issue is now being closed. If this issue still occurs in newer UCS versions, please use "Clone this bug". In this case please provide detailed information on how this issue is affecting you.
We really need UVMM (and other) statistics... And collectd is really common - we should drop MRTG. Also see Bug #33801 and Bug #41213 See <https://bygga.knut.univention.de/uvmm/> for an UVMM example. See <http://xen12.knut.univention.de/collectd/bin/index.cgi?action=show_selection;hostname=xen12.phahn.dev> for an UCS example.
Requested by a customer
This issue has been filed against UCS 4.2. UCS 4.2 is out of maintenance and many UCS components have changed in later releases. Thus, this issue is now being closed. If this issue still occurs in newer UCS versions, please use "Clone this bug" or reopen it and update the UCS version. In this case please provide detailed information on how this issue is affecting you.