Introscope Web Services API operation getLiveMetricData returns duplicate/multiple data

Document ID : KB000071562
Last Modified Date : 22/02/2018
Show Technical Document Details
Issue:
Using the Introscope Web Services operation getLiveMetricData duplicate/multiple data values are being returned i.e. 8 values in total.
Environment:
APM 9.x, 10.x
Resolution:
1. This is working as designed.
The getLiveMetricData operation has no start and end parameters and is hard-coded to return 2 minutes worth of data and so for the usual 15 second data interval that represents 8 values.
The getLiveMetricData response always has the latest timestamp in tagline '<multiRef id="id7"...</multiRef>' with corresponding data in tagline <'multiRef id="id15"' ...</multiRef> 
So if those 2 taglines can be extracted from the response they will provide a single data point.

2. The alternative option to retrieve a single set of values for 1 data interval is to use the getMetricData operation which has specific start and end times. 
For example testing getMetricData using SoapUI with startTime/endTime which is 15 seconds apart and a dataFrequency value of 15, returns a single data point:
REQUEST:
========
<met:getMetricData soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> 
<agentRegex xsi:type="xsd:string">willy03-I2438\|Web Servers\|Web Servers</agentRegex> 
<metricPrefix xsi:type="xsd:string">GC Heap:Bytes In Use</metricPrefix> 
<startTime xsi:type="xsd:dateTime">2018-02-22T04:14:15.000Z</startTime> 
<endTime xsi:type="xsd:dateTime">2018-02-22T04:14:30.000Z</endTime> 
<dataFrequency xsi:type="xsd:int">15</dataFrequency> 
</met:getMetricData> 
========

RESPONSE
=========
<ns1:getMetricDataResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://metricsdata.webservicesimpl.server.introscope.wily.com"> 
<getMetricDataReturn soapenc:arrayType="ns2:TimesliceGroupedMetricData[1]" xsi:type="soapenc:Array" xmlns:ns2="urn:ca.wily.introscope.webservices" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"> 
<getMetricDataReturn href="#id0"/> 
</getMetricDataReturn> 
</ns1:getMetricDataResponse> 
<multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns3:TimesliceGroupedMetricData" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns3="urn:ca.wily.introscope.webservices"> 
<metricData soapenc:arrayType="ns3:MetricData[1]" xsi:type="soapenc:Array"> 
<metricData href="#id1"/> 
</metricData> 
<timesliceEndTime xsi:type="xsd:dateTime">2018-02-22T04:14:30.000Z</timesliceEndTime> 
<timesliceStartTime xsi:type="xsd:dateTime">2018-02-22T04:14:15.000Z</timesliceStartTime> 
</multiRef> 
<multiRef id="id1" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns4:MetricData" xmlns:ns4="urn:ca.wily.introscope.webservices" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"> 
<agentName xsi:type="xsd:string">willy03-I2438|Web Servers|Web Servers</agentName> 
<metricName xsi:type="xsd:string">GC Heap:Bytes In Use</metricName> 
<metricType xsi:type="xsd:int">258</metricType> 
<metricValue xsi:type="xsd:string">4543544</metricValue> 
</multiRef> 
========= 
Additional Information:
https://docops.ca.com/ca-apm/10-5/en/integrating/api-reference/ca-introscope-web-services-api-reference/polling-web-services/metrics-data-web-service/metrics-data-web-service-wsdl-definition
The above documentation reference will be updated to add more details about what data the getLiveMetricData operation returns.