Bug 1127123

Summary: cannot figure out how to use show statistic
Product: [Retired] oVirt Reporter: Petr Beňas <pbenas>
Component: doc-REST_API_GuideAssignee: Andrew Burden <aburden>
Status: CLOSED CURRENTRELEASE QA Contact: Tahlia Richardson <trichard>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 3.5CC: bugs, ecohen, gklein, iheim, juan.hernandez, lsurette, pstehlik, rbalakri, yeylon
Target Milestone: ---Keywords: Reopened
Target Release: 3.6.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: docs
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-02-16 04:47:01 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Docs RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 1114551, 1186585    

Description Petr Beňas 2014-08-06 08:26:55 UTC
Description of problem:
I'm not able to figure out how to use the statistic.

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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:
  ====================================================== ERROR ====================================================
                                     statistic ['rack', 'host'] does not exist.
  =================================================================================================================

[oVirt shell (connected)]# show statistic help

  ====================================================== ERROR ====================================================
cannot find any context for type "statistic" using given arguments.,
possible arguments combinations are [['cluster', 'glustervolume'], ['vm'], ['datacenter', 'cluster', 'glustervolume'], ['host', 'nic'], ['datacenter', 'storagedomain', 'disk'], ['host', 'numanode'], ['cluster', 'glustervolume', 'brick'], ['vm', 'disk'], ['job', 'step'], ['host'], ['disk'], ['vm', 'nic'], ['storagedomain', 'disk'], ['datacenter', 'cluster', 'glustervolume', 'brick']].
  =================================================================================================================

[oVirt shell (connected)]# show statistic host

  ====================================================== ERROR ====================================================
cannot find any context for type "statistic" using given arguments.,
possible arguments combinations are [['cluster', 'glustervolume'], ['vm'], ['datacenter', 'cluster', 'glustervolume'], ['host', 'nic'], ['datacenter', 'storagedomain', 'disk'], ['host', 'numanode'], ['cluster', 'glustervolume', 'brick'], ['vm', 'disk'], ['job', 'step'], ['host'], ['disk'], ['vm', 'nic'], ['storagedomain', 'disk'], ['datacenter', 'cluster', 'glustervolume', 'brick']].
  =================================================================================================================

[oVirt shell (connected)]# show statistic ['host']

  ====================================================== ERROR ====================================================
cannot find any context for type "statistic" using given arguments.,
possible arguments combinations are [['cluster', 'glustervolume'], ['vm'], ['datacenter', 'cluster', 'glustervolume'], ['host', 'nic'], ['datacenter', 'storagedomain', 'disk'], ['host', 'numanode'], ['cluster', 'glustervolume', 'brick'], ['vm', 'disk'], ['job', 'step'], ['host'], ['disk'], ['vm', 'nic'], ['storagedomain', 'disk'], ['datacenter', 'cluster', 'glustervolume', 'brick']].
  =================================================================================================================

[oVirt shell (connected)]# show statistic --host-identifier rack

  ====================================================== ERROR ====================================================
                                           statistic identifier required.
  =================================================================================================================

[oVirt shell (connected)]# show statistic --host-identifier rack host

  ====================================================== ERROR ====================================================
                                           statistic host does not exist.
  =================================================================================================================

[oVirt shell (connected)]# show statistic --host-identifier rack --id host

  ====================================================== ERROR ====================================================
                                     statistic ['rack', 'host'] does not exist.
  =================================================================================================================

[oVirt shell (connected)]# 


Expected results:


Additional info:

Comment 1 Juan Hernández 2014-08-20 08:13:25 UTC
First you need to enumerate the statistics available for the host object using the "list" command:

  [oVirt shell (connected)]# list statistics --host-identifier node1
  id         : 7816602b-c05c-3db7-a4da-3769f7ad8896
  name       : memory.total
  description: Total memory

  id         : b7499508-c1c3-32f0-8174-c1783e57bb08
  name       : memory.used
  description: Used memory

  ...

Then you can see the details for a particular statistic using the "show" command:

  [oVirt shell (connected)]# show statistic memory.total --host-identifier node1
  id                : 7816602b-c05c-3db7-a4da-3769f7ad8896
  name              : memory.total
  description       : Total memory
  host-id           : ab85f8b5-da72-4e02-a8b1-de3cb77df220
  type              : GAUGE
  unit              : BYTES
  values-type       : INTEGER
  values-value-datum: 0

Comment 2 Petr Beňas 2014-09-05 14:11:20 UTC
I understand this is possible (and I was able to verify the blocked bug), but I'd like to have this docummented in docs. Checked docs both for 3.4 and 3.5 and there's no indication that user should use list before show. If a customer is trying to use list, how is he supposed to know he should use list before?

Comment 3 Sandro Bonazzola 2014-10-17 12:14:40 UTC
Moving pending bugs not fixed in 3.5.0 to 3.5.1.

Comment 5 Sandro Bonazzola 2015-01-21 16:08:42 UTC
oVirt 3.5.1 has been released, re-targeting to 3.6.0 as not marked as urgent / high severity or priority

Comment 7 Andrew Burden 2015-02-10 02:42:25 UTC
Background: 
Statistic subcollections exist for multiple resources in the rhevm-shell part of the Technical Guide, however a use case exists for a statistic resource topic in its own right that caters the work flow required (and IMHO is more useful than referring to the sub-collection for each resource).

Changes:
A new topic '42699 - statistic' has been created that lists the resource-identifiers associated with the statistic resource in the rhevm-shell. The topic includes a work flow through two examples using the 'list' command to display the statistics available for the specified resource, and using the 'show' command to display the specified statistical information for that particular resource.

Docs link:
http://docbuilder.usersys.redhat.com/22767/#statistic

Comment 8 Tahlia Richardson 2015-02-10 03:03:17 UTC
Commands work, no grammar/spelling errors found, reads fine. 

Moving to VERIFIED.