Skip to content
Snippets Groups Projects
Commit 3f5ee064 authored by Nikolay Stanchev's avatar Nikolay Stanchev
Browse files

Updates Graph API Influx query

parent 4d442827
No related branches found
No related tags found
No related merge requests found
......@@ -74,13 +74,13 @@ It offers different API endpoints to configure and control the aggregator as wel
These parameters are then filled in the following influx query template:
```
SELECT {0}, {1}, {2} AS mean_response_time FROM "{3}"."{4}".{5} WHERE sfc_i='{6}' and time>={7} and time<{8} GROUP BY ipendpoint, location, sf_i
SELECT {0} AS mean_response_time, {1} AS mean_request_size, {2} AS mean_response_size FROM "{3}"."{4}".{5} WHERE sfc_i='{6}' and time>={7} and time<{8} GROUP BY ipendpoint, location, sf_i
```
E.g. for the minio service function, the following query will be used to retrieve the data from influx (request url is /graph/build?from=1528385420&to=1528385860):
```
SELECT mean(sum)/mean(count), mean(request_size)/mean(count), mean(response_size)/mean(count) AS mean_response_time FROM "MSDemo"."autogen".minio_http_requests_duration_seconds WHERE sfc_i='MSDemo_1' and time>=1528385420000000000 and time<1528385860000000000 GROUP BY ipendpoint, location, sf_i
SELECT mean(sum)/mean(count) AS mean_response_time, mean(request_size)/mean(count) AS mean_request_size, mean(response_size)/mean(count) AS mean_response_size FROM "MSDemo"."autogen".minio_http_requests_duration_seconds WHERE sfc_i='MSDemo_1' and time>=1528385420000000000 and time<1528385860000000000 GROUP BY ipendpoint, location, sf_i
```
N.B. timestamps are converted to nano seconds.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment