Capturing current polled data using odata query builder
book
Article ID: 118679
calendar_today
Updated On:
Products
CA Infrastructure ManagementCA Performance Management
Issue/Introduction
How can I capture current polled data for a metric using odata query builder?
Environment
CAPM 3.x
Resolution
It takes time to load data into the database, especially at scale. The solution is it to provide a time interval to the query, using starttime and endtime parameters to get what you want. For example, odata/api/devices?$&$expand=memorymfs&$select=Name,memorymfs/im_Utilization, memorymfs/Timestamp &starttime=1539973500&endtime=1539973560&top=1
Here is another example of a query from the metric family perspective: odata/api/memorymf?$orderby=Timestamp desc&$expand=device&$select=ID,DeviceItemID,Timestamp,im_Utilization,device/ID,device/Name&$filter=((Timestamp eq 1539972900))
Another possibility would be to set defaultRateTimeIntervalSecs = 600 in /opt/IMDataAggregator/apache-karaf-<vers>/etc/com.ca.im.odata.beans.ODataLimiters.cfg and use &top=1 with the query. The query will return data for previous poll. For example: odata/api/devices?$&$expand=memorymfs&$select=Name,memorymfs/im_Utilization, memorymfs/Timestamp&top=1