Skip to content
This repository has been archived by the owner on Nov 8, 2022. It is now read-only.

Only the latest version of the metrics returned while there are more than one #526

Closed
candysmurf opened this issue Nov 20, 2015 · 0 comments

Comments

@candysmurf
Copy link
Contributor

when run: http://localhost:8181/v1/metrics, it had the output as:

{
    "meta": {
        "code": 200,
        "message": "Metric",
        "type": "metrics_returned",
        "version": 1
    },
    "body": [{
        "last_advertised_timestamp": 1447977606,
        "namespace": "/intel/mock/*/baz",
        "version": 1
    }, {
        "last_advertised_timestamp": 1447977606,
        "namespace": "/intel/mock/*/baz",
        "version": 2
    }, {
        "last_advertised_timestamp": 1447977606,
        "namespace": "/intel/mock/bar",
        "version": 1
    }, {
        "last_advertised_timestamp": 1447977606,
        "namespace": "/intel/mock/bar",
        "version": 2
    }, {
        "last_advertised_timestamp": 1447977606,
        "namespace": "/intel/mock/foo",
        "version": 1,
        "policy": [{
            "name": "name",
            "type": "string",
            "default": "bob",
            "required": false
        }, {
            "name": "password",
            "type": "string",
            "required": true
        }]
    }, {
        "last_advertised_timestamp": 1447977606,
        "namespace": "/intel/mock/foo",
        "version": 2,
        "policy": [{
            "name": "name",
            "type": "string",
            "default": "bob",
            "required": false
        }, {
            "name": "password",
            "type": "string",
            "required": true
        }]
    }]
}

When run: http://localhost:8181/v1/metrics/intel/mock/foo, it only returned the version 2, version 1 metrics was missing in the output:

{
    "meta": {
        "code": 200,
        "message": "Metric returned",
        "type": "metric_returned",
        "version": 1
    },
    "body": {
        "Metric": {
            "last_advertised_timestamp": 1447977606,
            "namespace": "/intel/mock/foo",
            "version": 2,
            "policy": [{
                "name": "name",
                "type": "string",
                "default": "bob",
                "required": false
            }, {
                "name": "password",
                "type": "string",
                "required": true
            }]
        }
    }
}
@lynxbat lynxbat added tracked and removed tracked labels Nov 20, 2015
@pittma pittma closed this as completed in 51ac1bf Dec 5, 2015
pittma added a commit that referenced this issue Dec 5, 2015
fix #526: adds lookup for GetMetricVersions
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants