Bug 1322271

Summary: Failed to show network metrics
Product: OpenShift Container Platform Reporter: chunchen <chunchen>
Component: HawkularAssignee: Matt Wringe <mwringe>
Status: CLOSED ERRATA QA Contact: chunchen <chunchen>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.2.0CC: adellape, aos-bugs, wsun
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
In previous releases, network metrics were not included when cluster metrics were enabled. This bug fix allows for network metrics to now be shown via REST API.
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-06-27 15:05:54 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description chunchen 2016-03-30 07:51:14 UTC
Description of problem:
It's failed to show network metrics.

Version-Release number of selected component (if applicable):
openshift v3.2.0.8
kubernetes v1.2.0-36-g4a3f9c5
etcd 2.2.5

openshift3/metrics-deployer d3b5bd02c6ad
openshift3/metrics-hawkular-metrics 0d825e62d05a
openshift3/metrics-heapster 9a6aa3a55a44
openshift3/metrics-cassandra 2f9af4d01e97

How reproducible:
always

Steps to Reproduce:
1. Deploy the metrics stack
2. Check the network metrics of pods
1) $ curl -k -H "Authorization: Bearer `oc whoami -t`" -X GET https://${OPENSHIFT_MASTER}:8443/api/v1/proxy/namespaces/chunchen/services/https:heapster:/api/v1/model/namespaces/chunchen/pods/hawkular-metrics-8s53c/metrics/network/tx

2) $ curl -k -H "Authorization: Bearer `oc whoami -t`" -X GET https://${OPENSHIFT_MASTER}:8443/api/v1/proxy/namespaces/chunchen/services/https:heapster:/api/v1/model/namespaces/chunchen/pods/hawkular-metrics-8s53c/metrics

Actual results:
2.1 404: Page Not Found
2.2 
[
  "fs-usagerhel-docker--pool",
  "cpu-limit",
  "fs-limit-dev-mapper-rhel-root",
  "fs-usage-dev-vda1",
  "memory-limit",
  "fs-limit-dev-vda1",
  "memory-usage",
  "fs-usage-dev-mapper-rhel-root",
  "fs-limitrhel-docker--pool",
  "cpu-usage",
  "memory-working"
 ]

Expected results:
Should show network metrics via REST API

Additional info:

Comment 1 Matt Wringe 2016-03-30 13:31:50 UTC
Network level metrics are not in the OSE metric images, only the origin-metrics images.

The Network level metrics are not planned for 3.2 but for a future release.

Comment 3 chunchen 2016-06-07 03:00:31 UTC
It's fixed, checked with 3.2.1 images, please refer to the below results:

<-------snip------>
{
        "id": "pod/1c413744-2bce-11e6-b62f-fa163e0a0785/network/rx", 
        "tags": {
            "descriptor_name": "network/rx", 
            "group_id": "/network/rx", 
            "host_id": "HOST-ID", 
            "hostname": "HOST-NAME", 
            "labels": "metrics-infra:hawkular-cassandra,name:hawkular-cassandra-1,type:hawkular-cassandra", 
            "namespace_id": "d47da9c4-2bcd-11e6-b290-fa163ed99e32", 
            "namespace_name": "metrics", 
            "nodename": "openshift-150.lab.sjc.redhat.com", 
            "pod_id": "1c413744-2bce-11e6-b62f-fa163e0a0785", 
            "pod_name": "hawkular-cassandra-1-u3wq7", 
            "pod_namespace": "metrics", 
            "type": "pod", 
            "units": "bytes"
        }, 
        "tenantId": "metrics", 
        "type": "counter"
    }, 
<-------snip------>

Comment 6 errata-xmlrpc 2016-06-27 15:05:54 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

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

https://access.redhat.com/errata/RHBA-2016:1343