magneticio/vamp

Metrics endpoint does not work as per the API documentation

tnolet opened this issue · 1 comments

The docs state link that you can gate metrics from a gateway using the REST API. Syntax as follows.

/api/v1/metrics/gateways/{gateway}/{metrics}

Using the following gateway "simple-deployment/950"

Tims-MBP:~ tim$ vamp list gateways
 NAME                                   PORT         SERVICE HOST   SERVICE PORT   STICKY   TYPE     
 simple-deployment/9050                 9050         172.17.0.1     9050/http      false    external 
 simple-deployment/simple-cluster/web   40004/http   172.17.0.1     40004/http     false    internal 

I try to get metrics, but I just get an error "unexpected resource"

Tims-MBP:~ tim$ http localhost/service/vamp/api/v1/metrics/gateways/simple-deployment/9050/response-time
HTTP/1.1 400 Bad Request
Connection: keep-alive
Content-Length: 45
Content-Type: application/json
Date: Tue, 24 Oct 2017 09:52:06 GMT
Server: openresty/1.9.15.1

{
    "message": "Unexpected resource: 'metrics'."
}

Closing this as it seems to be a configuration issue.