Bug 1321349 - OpenShift nodes metrics missing machine prefix
Summary: OpenShift nodes metrics missing machine prefix
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Hawkular
Version: unspecified
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Matt Wringe
QA Contact: chunchen
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-03-25 17:31 UTC by Federico Simoncelli
Modified: 2018-07-26 19:02 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-05-12 17:13:36 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Federico Simoncelli 2016-03-25 17:31:09 UTC
Description of problem:
The id of the nodes metrics is missing the 'machine' prefix.

Version-Release number of selected component (if applicable):
Heapster version 0.20.0-alpha7

How reproducible:
100%

Steps to Reproduce:
1. Deploy metrics
2. Collect _system metrics (nodes)

Actual results:
The metrics id changed from 'machine/id/<node-name>' to '/id/<node-name>' (missing 'machine' prefix).

Expected results:
Unless there's a valid reason for this change, the metrics id should be consistent with previous versions.


Additional info:

# curl -s -k -H "Hawkular-Tenant: _system" -u hawkular:$PASSWORD https://$HOSTNAME/hawkular/metrics/metrics?tags=group_id:/cpu/usage | jq '.[].id'
"/vm-48-10.eng.lab.tlv.redhat.com/cpu/usage"
"/vm-48-13.eng.lab.tlv.redhat.com/cpu/usage"
"/vm-48-9.eng.lab.tlv.redhat.com/cpu/usage"
"/vm-48-6.eng.lab.tlv.redhat.com/cpu/usage"
"/vm-48-12.eng.lab.tlv.redhat.com/cpu/usage"
"/vm-48-7.eng.lab.tlv.redhat.com/cpu/usage"
"/vm-48-8.eng.lab.tlv.redhat.com/cpu/usage"
"/vm-48-11.eng.lab.tlv.redhat.com/cpu/usage"

Expected output (as for 3.1) was:

"machine/vm-48-10.eng.lab.tlv.redhat.com/cpu/usage"
"machine/vm-48-13.eng.lab.tlv.redhat.com/cpu/usage"
"machine/vm-48-9.eng.lab.tlv.redhat.com/cpu/usage"
"machine/vm-48-6.eng.lab.tlv.redhat.com/cpu/usage"
"machine/vm-48-12.eng.lab.tlv.redhat.com/cpu/usage"
"machine/vm-48-7.eng.lab.tlv.redhat.com/cpu/usage"
"machine/vm-48-8.eng.lab.tlv.redhat.com/cpu/usage"
"machine/vm-48-11.eng.lab.tlv.redhat.com/cpu/usage"

Comment 1 Matt Wringe 2016-03-28 13:43:51 UTC
@Federico is this really for OSE or origin?

Comment 2 Matt Wringe 2016-03-28 13:51:58 UTC
Also, can you please explain why you are directly trying to derive the resource id? The resource id should be opaque, you should not be directly trying to calculate them but instead be performing a query based on the criteria that you are wanting

Comment 3 Matt Wringe 2016-04-04 14:00:09 UTC
PR submitted: https://github.com/kubernetes/heapster/pull/1116

Will update origin-metrics once it is merged

Comment 4 Matt Wringe 2016-04-06 17:35:26 UTC
origin-metrics has been updated

Comment 5 chunchen 2016-04-07 10:22:43 UTC
It's fixed, the images built from the latest source repo, please refer to the below messages:

[chunchen@F17-CCY scripts]$ oc rsh hawkular-metrics-qxlh1
sh-4.2$ curl -k -H "Authorization: Bearer <user-token>" -H "Hawkular-Tenant: _system" https://172.30.37.211/hawkular/metrics/metrics?tags=group_id:/cpu/usage |python -mjson.tool
[
    {
        "dataRetention": 7,
        "id": "machine/ip-172-18-6-225.ec2.internal/cpu/usage",
        "tags": {
            "descriptor_name": "cpu/usage",
            "group_id": "/cpu/usage",
            "host_id": "ip-172-18-6-225.ec2.internal",
            "hostname": "ip-172-18-6-225.ec2.internal",
            "nodename": "ip-172-18-6-225.ec2.internal",
            "type": "node",
            "units": "ns"
        },
        "tenantId": "_system",
        "type": "counter"
    }
]


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