[TSDR-27] Log aggregation on the fly not working Created: 20/Jun/16  Updated: 31/Aug/16  Resolved: 31/Aug/16

Status: Resolved
Project: tsdr
Component/s: General
Affects Version/s: unspecified
Fix Version/s: None

Type: Bug
Reporter: AbdulRahman AlHamali Assignee: Jesse White
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


External issue ID: 6087
Priority: High

 Description   

I tried this example:

curl -G -v -H "Accept: application/json" -H "Authorization: Basic YWRtaW46YWRtaW4=" "http://localhost:8181/tsdr/metrics/query" --data-urlencode "tsdrkey=[NID=][DC=FLOWSTATS][RK=]" --data-urlencode "from=0" --data-urlencode "until=2400000000" --data-urlencode "interval=6000000" --data-urlencode "aggregation=MEAN" > test

Here, (until - from) / interval = 400

However, I still receive a thousand, non-aggregated records.

Here is the output of the curl command:

  • Trying 127.0.0.1...
    % Total % Received % Xferd Average Speed Time Time Time Current
    Dload Upload Total Spent Left Speed
    0 0 0 0 0 0 0 0 -::- -::- -::- 0* Connected to localhost (127.0.0.1) port 8181 (#0)
    > GET /tsdr/metrics/query?tsdrkey=%5BNID%3D%5D%5BDC%3DFLOWSTATS%5D%5BRK%3D%5D&from=0&until=2400000000&interval=6000000&aggregation=MEAN HTTP/1.1
    > Host: localhost:8181
    > User-Agent: curl/7.45.0
    > Accept: application/json
    > Authorization: Basic YWRtaW46YWRtaW4=
    >
    < HTTP/1.1 201 Created
    < Set-Cookie: JSESSIONID=1uin4b3kbe5es4zlvlng17igc;Path=/tsdr
    < Expires: Thu, 01 Jan 1970 00:00:00 GMT
    < Set-Cookie: rememberMe=deleteMe; Path=/tsdr; Max-Age=0; Expires=Sun, 12-Jun-2016 11:36:49 GMT
    < Content-Type: application/json
    < Transfer-Encoding: chunked
    < Server: Jetty(8.1.17.v20150415)
    <
    { [16071 bytes data]
    100 178k 0 178k 0 0 19.6M 0 -::- -::- -::- 21.8M
  • Connection #0 to host localhost left intact


 Comments   
Comment by Sharon Aicler [ 18/Jul/16 ]

I have switch the "interval" value with "maxDataPoints" so now the user, when aggregating, can specify how many point he wants to received from the period.
The new curl command looks as follows:

curl -G -v -H "Accept: application/json" -H "Authorization: Basic YWRtaW46YWRtaW4=" "http://localhost:8181/tsdr/metrics/query" --data-urlencode "tsdrkey=[NID=Controller][DC=EXTERNAL][MN=Heap:Memory:Usage]" --data-urlencode "from=0" --data-urlencode "until=2400000000" --data-urlencode "maxDataPoints=4" --data-urlencode "aggregation=MEAN" > test

In the above example i requested only 4 points...

Generated at Wed Feb 07 20:46:11 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.