Closed jbonnet closed 7 years ago
@pkarkazis @mzacharioudakis PR #598 introduces the above described API. Can you please check if it is ok from the GUI's side?
@jbonnet Hello we have a problem when I make a request on gkapi: curl https://sp.int3.sonata-nfv.eu/api/v2/kpis?name=user_registrations&start=2017-05-05T14:13:02.699Z&end=2017-05-05T14:33:02.699Z&step=10m I get as response: { "error": { "code": 400, "message": "No list of KPIs was returned" } }
But, if I make the same request directly to Mon-Manager: curl -H "Content-Type: application/json" -d '{"name":"user_registrations","start":"2017-05-05T14:13:02.699Z","end":"2017-05-05T14:33:02.699Z","step":"10m","labels":[{}]}' http://sp.int3.sonata-nfv.eu:8000/api/v1/prometheus/metrics/data
I receive data: { "metrics": { "resultType": "matrix", "result": [{ "metric": { "exported_instance": "gtkapi", "group": "development", "exported_job": "sonata", "module": "users", "elapsed_time": "0.593299396", "instance": "pushgateway:9091", "job": "sonata", "result": "ok", "name": "user_registrations", "method": "POST", "uuid": "b70863c9-9b92-4733-b45a-1990362bb2ef" }, "values": [ [1493994782.699, "1"] ] }] } }
Could you please check the connection timeout in gk's request?
Sure, let me check...
On 5 May 2017, at 15:59, Panos Karkazis notifications@github.com wrote:
@jbonnet https://github.com/jbonnet Hello we have a problem when I make a request on gkapi: curl https://sp.int3.sonata-nfv.eu/api/v2/kpis?name=user_registrations&start=2017-05-05T14:13:02.699Z&end=2017-05-05T14:33:02.699Z&step=10m https://sp.int3.sonata-nfv.eu/api/v2/kpis?name=user_registrations&start=2017-05-05T14:13:02.699Z&end=2017-05-05T14:33:02.699Z&step=10m I get as response: { "error": { "code": 400, "message": "No list of KPIs was returned" } }
But, if I make the same request directly to Mon-Manager: curl -H "Content-Type: application/json" -d '{"name":"user_registrations","start":"2017-05-05T14:13:02.699Z","end":"2017-05-05T14:33:02.699Z","step":"10m","labels":[{}]}' http://sp.int3.sonata-nfv.eu:8000/api/v1/prometheus/metrics/data http://sp.int3.sonata-nfv.eu:8000/api/v1/prometheus/metrics/data I receive data: { "metrics": { "resultType": "matrix", "result": [{ "metric": { "exported_instance": "gtkapi", "group": "development", "exported_job": "sonata", "module": "users", "elapsed_time": "0.593299396", "instance": "pushgateway:9091", "job": "sonata", "result": "ok", "name": "user_registrations", "method": "POST", "uuid": "b70863c9-9b92-4733-b45a-1990362bb2ef" }, "values": [ [1493994782.699, "1"] ] }] } }
Could you please check the connection timeout in gk's request?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/sonata-nfv/son-gkeeper/issues/595#issuecomment-299488220, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAuQxgNhryitZuGT6HEV3jCwOxTCM0Sks5r2zlSgaJpZM4NPeKx.
@pkarkazis Can you try again please?
@jbonnet no change.... it has the same behavior as it did before :(
@pkarkazis I've fixed a few glitches and did a couple of PRs. I'll try later to fix this...
Thanks,
@mzacharioudakis
After chating with you last thursday on what has been implemented in the GUI to show KPIs, I've noticed, I've noticed one thing: maybe what we want to show is not a counter
(of registered users and on-boarded packages), as it is implemented, but a gauge
, although the details of the counter also carry the time the GK took to create those two entities (users and packages)?
In the end, what I think we should show at the demo, was a graphic showing that 95% of packages were on-boarded in 1minute or less
. If we want to show this, what's the best way to save that information, a counter
or a gauge
? What do you think?
CC: @pkarkazis, @trakadasp, @srodriguezOPT
@jbonnet The most suitable way to store user registrations and packages on board is as gauge metrics because we must be able to dicrease the values of these kpis.
Ok, I can change that... @mzacharioudakis, is that ok? You've got code with this already...
Closed, continues in #630
The GUI needs to request existing KPIs. The GUI should request
.../api/v2/kpis?name=user_registrations&start=…&end=…&step=...
The GK API should transform this intoPOST .../api/v1/prometheus/metrics/data
with body{"name":"user_registrations","start": "2017-05-03T11:41:22Z", "end": "2017-05-03T11:51:11Z", "step": "10s", "labels":[]}