issues with analytics filters

Not applicable

Hi ,

we tried to use filter condition as filter=(message_count eq 30) and with select=sum(message_count), but we are getting null data .

API call thats made by the edge UI are ,

1) Without filter condition , select condition as sum(message_count)

/stats/apiproxy?_optimized=js&accuracy=100&limit=14400&select=sum(message_count)&sort=DESC&sortby=sum(message_count)&timeRange=06%2F14%2F2016+00:00:00~06%2F21%2F2016+00:00:00&timeUnit=hour&tsAscending=true&tzo=330

the graph shows that for a particular proxy sum of traffic is 30.

2) With filter condition as (message_count eq 30) and select as sum(message_count)

/stats/apiproxy?_optimized=js&accuracy=100&filter=(message_count+eq+30)&limit=14400&realtime=true&select=sum(message_count)&sort=DESC&sortby=sum(message_count)&timeRange=06%2F17%2F2016+13:23:00~06%2F17%2F2016+13:33:00&timeUnit=minute&tsAscending=true&tzo=330

this shows the null data in graph.

Can u please explain why the filter condition is not working?

Whats exactly the difference between sum(message_count) and message_count ?

Thanks,

Ramya

0 3 374
3 REPLIES 3

Not applicable

Filters are applied on individual records. Your first query returns 30 as the sum over number of records over a time period. Your second query tries to apply the filter "(message_count+eq+30)" to individual records which doesn't hold good on any record.

@Ramya S M

Sukhesh has correctly pointed out the reason behind the different output.

Also, the time mention in the Management API call is in UTC where as that in the Management UI is depends on the time running on the server.

Thanks @Sukhesh Gopala , @gbhandari ,

Can u please suggest what should be the correct query if i want to check the traffic of apiproxy which is greater than 30?

and also We tried creating a new custom report to plot graph for traffic and api proxies , with metric as Traffic , aggregate function 'sum'. we could get data for this , with one proxy having sum of traffic 30. when we applied filter as traffic = 30 then the there was no data found.