Bug 1264172

Summary: [RFE] Add time stamp to RESTAPI statistics data
Product: [oVirt] ovirt-engine Reporter: Juan Hernández <juan.hernandez>
Component: RFEsAssignee: Scott Herold <sherold>
Status: CLOSED WONTFIX QA Contact: Gil Klein <gklein>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 3.6.0CC: bugs, juan.hernandez
Target Milestone: ---Keywords: FutureFeature
Target Release: ---Flags: juan.hernandez: ovirt-future?
rule-engine: planning_ack?
rule-engine: devel_ack?
rule-engine: testing_ack?
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: infra
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-11-23 09:01:55 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Infra RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Juan Hernández 2015-09-17 17:36:25 UTC
Currently the RESTAPI doesn't include time stamps for the statistical data that it provides. For example, the CPU usage data is reported as follows:

  GET /hosts/{host:id}/statistics/{statistic:id}
  <statistic href="..." id="...">
    <name>cpu.current.user</name>
    <description>User CPU usage</description>
    <values type="DECIMAL">
      <value>
        <datum>53</datum>
      </value>
    </values>
    <type>GAUGE</type>
    <unit>PERCENT</unit>
  </statistic>

With this information it isn't possible to know exactly when the information was collected. For users of the RESTAPI that poll these statistics periodically this complicates calculation of accurate averages, or any other statistical measures.

The objective of this RFE is to add to the statistics a time stamp that reliably indicates when the data was collected:

  GET /hosts/{host:id}/statistics/{statistic:id}
  <statistic href="..." id="...">
    ...
    <values type="DECIMAL">
      <value>
        <datum>53</datum>
        <time>2015-09-17T19:34:30.892+02:00</time>
      </value>
    </values>
  </statistic>

Note that even if the objective is to add the time stamp at the RESTAPI level, the rest of the components of the system (engine and VDSM) may need to be modified as well.

Comment 1 Yaniv Kaul 2015-11-22 20:27:27 UTC
4.0 material?

Comment 2 Juan Hernández 2015-11-23 09:01:55 UTC
When I opened this bug I thought that it was the solution for a specific user requirement. But it turned out that what they really need is what bug 1168022 requests. So this isn't needed any longer. I think that it would be nice to have, but no one actually needs it. I'm closing it.