Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1127123 - cannot figure out how to use show statistic
cannot figure out how to use show statistic
Status: CLOSED CURRENTRELEASE
Product: oVirt
Classification: Retired
Component: doc-REST_API_Guide (Show other bugs)
3.5
Unspecified Unspecified
unspecified Severity unspecified
: ---
: 3.6.0
Assigned To: Andrew Burden
Tahlia Richardson
docs
: Reopened
Depends On:
Blocks: 1114551 1186585
  Show dependency treegraph
 
Reported: 2014-08-06 04:26 EDT by Petr Beňas
Modified: 2016-02-10 14:28 EST (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-02-15 23:47:01 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Docs
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Petr Beňas 2014-08-06 04:26:55 EDT
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 04:13:25 EDT
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 10:11:20 EDT
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 08:14:40 EDT
Moving pending bugs not fixed in 3.5.0 to 3.5.1.
Comment 5 Sandro Bonazzola 2015-01-21 11:08:42 EST
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-09 21:42:25 EST
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-09 22:03:17 EST
Commands work, no grammar/spelling errors found, reads fine. 

Moving to VERIFIED.

Note You need to log in before you can comment on or make changes to this bug.