Bug 1529271

Summary: [RFE] report VM statistics by collectd virt-plugin
Product: [oVirt] ovirt-engine-metrics Reporter: Shirly Radco <sradco>
Component: RFEsAssignee: Shirly Radco <sradco>
Status: CLOSED CURRENTRELEASE QA Contact: Lukas Svaty <lsvaty>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 1.0.0CC: bugs, lsvaty, lveyde, mperina, tgolembi, ybronhei
Target Milestone: ovirt-4.2.2Keywords: FutureFeature
Target Release: ---Flags: rule-engine: ovirt-4.2?
rule-engine: planning_ack?
sbonazzo: devel_ack+
lsvaty: testing_ack+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovirt-engine-metrics-1.1.3.1 Doc Type: Bug Fix
Doc Text:
Cause: VDSM was missing vm memory statistics. Consequence: This is a very important metrics and we needed to add it. Fix: Replaced VDSM VM statistics with collectd-virt plugin stats. Result: The Statistics will now be collected by virt plugin, documentation and dashboards should be updated to use the new VM metrics and remove the statsd (VDSM) vm metrics.
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-03-29 11:00:52 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Metrics RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1370909, 1542993    

Description Shirly Radco 2017-12-27 12:03:07 UTC
Description of problem:
VDSM does not report VM memory statistics to collectd statsd plugin.

Version-Release number of selected component (if applicable):
vdsm-4.20.7-55

How reproducible:
100%

Steps to Reproduce:
1. Setup ovirt-metrics
2. Check statsd plugin statistics
3.

Actual results:
No memory statistics reported by vdsm.

Expected results:
Send memory usage statistics for vms to collectd statsd plugin.

Additional info:

Comment 1 Yaniv Bronhaim 2018-01-02 13:42:08 UTC
The patch reports the memory values from bulk stats returned from libvirt. this will be enabled only with this patch https://gerrit.ovirt.org/#/c/80721/ in engine side (not part of ovirt-engine-4.1).
I guess that once setting "dommemstat --period 5 [vm-name]" you will get the balloon info also from collectd plugin. 

In https://gerrit.ovirt.org/#/c/80644/ we take the balloon info and translate it to memoryStats - which then can be sent from vdsm. If this is still useful more than using only collectd virt plugin, the fix indeed adds the desired logic.

Comment 2 Yaniv Bronhaim 2018-01-02 14:01:22 UTC
Even if we merge the patch and upgrade to 4.2 - adding the set for memballoon in the vm xml requires to run dommemstat manually or creating the vm again.

Comment 3 Shirly Radco 2018-01-08 12:07:09 UTC
Can't we automate this so on upgrade this will be set?

Comment 4 Yaniv Bronhaim 2018-01-09 06:55:45 UTC
I can't imagine valid scenario where after ovirt upgrade all your vms will be rebooted automatically. 
Tomas - can you attach  <stats period='5' /> to memballoon section on runtime for all vms during upgrade to 4.2? I

Comment 5 Tomáš Golembiovský 2018-01-09 12:35:16 UTC
(In reply to Yaniv Bronhaim from comment #4)
> I can't imagine valid scenario where after ovirt upgrade all your vms will
> be rebooted automatically. 

This is a new feature. Where's the problem in waiting for users to reboot the machines when they see fit?

> Tomas - can you attach  <stats period='5' /> to memballoon section on
> runtime for all vms during upgrade to 4.2? I

Doing it in runtime is not a problem. But from what I've been told we are not doing this kind of modifications during upgrades in VDSM.

Comment 6 Yaniv Bronhaim 2018-01-10 08:51:15 UTC
filed Bug #1532681 and Bug #1532692 to cover the requirement to reboot the vms to get memory stats.

Comment 7 Red Hat Bugzilla Rules Engine 2018-01-15 14:36:52 UTC
Target release should be placed once a package build is known to fix a issue. Since this bug is not modified, the target version has been reset. Please use target milestone to plan a fix for a oVirt release.

Comment 8 Yaniv Bronhaim 2018-01-15 14:38:57 UTC
the patch https://gerrit.ovirt.org/#/c/86309 restructures the metrics names to fit collector expectation (vmname.memory.value). This still returns zero values until fetching GA info as part of the stats (Bug #1532692)

Comment 9 Martin Perina 2018-01-15 15:43:28 UTC
Moving the dependency to See also, because infra part can be merged into VDSM, so relevant field will be propagated into metrics store. But those fields values will always be 0 until BZ1532692 is fixed

Comment 10 Yaniv Bronhaim 2018-02-07 07:30:26 UTC
Abandoning current patch. virt values will be collected in ovirt-4.2.2 by collectd 5.8.0 virt-plugin - this should follow removal patch for all unneeded vm stats that we sent from vdsm (Bug #1370909)

Comment 11 Lukas Svaty 2018-03-21 16:42:55 UTC
virt stats are being reported correctly in collectd.virt plugin

ovirt-engine-metrics-1.1.3.3-1.el7ev.noarch

Comment 12 Sandro Bonazzola 2018-03-29 11:00:52 UTC
This bugzilla is included in oVirt 4.2.2 release, published on March 28th 2018.

Since the problem described in this bug report should be
resolved in oVirt 4.2.2 release, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.