Bug 15757 - Collect UVMM and UCS statistics with collectd (or MRTG)
Collect UVMM and UCS statistics with collectd (or MRTG)
Status: RESOLVED WONTFIX
Product: UCS
Classification: Unclassified
Component: UMC (Generic)
UCS 4.2
Other Linux
: P3 enhancement with 6 votes (vote)
: ---
Assigned To: UMC maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-09-29 15:05 CEST by Felix Botner
Modified: 2020-07-03 20:54 CEST (History)
5 users (show)

See Also:
What kind of report is it?: Feature Request
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?: Yes
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number: 2017022221000438
Bug group (optional): External feedback
Max CVSS v3 score:


Attachments
Collect libvirt statistics (5.60 KB, text/x-python)
2013-07-25 11:15 CEST, Philipp Hahn
Details
Sample Tape Archive (30.00 KB, application/octet-stream)
2013-07-31 12:09 CEST, Philipp Hahn
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Felix Botner univentionstaff 2009-09-29 15:05:51 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
   * ...
Comment 1 Philipp Hahn univentionstaff 2013-02-04 09:13:29 CET
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>).
Comment 2 Philipp Hahn univentionstaff 2013-07-25 11:15:58 CEST
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/>
Comment 3 Philipp Hahn univentionstaff 2013-07-31 12:09:03 CEST
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
Comment 4 Stefan Gohmann univentionstaff 2014-02-18 21:37:54 CET
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.
Comment 5 Philipp Hahn univentionstaff 2017-02-23 15:41:41 CET
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.
Comment 6 Michael Grandjean univentionstaff 2017-05-05 11:42:36 CEST
Requested by a customer
Comment 7 Ingo Steuwer univentionstaff 2020-07-03 20:54:20 CEST
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.