Can we use the UIM API to know the last date on which a certain device generated a metric?
Release : 20.3, 20.4
Unfortunately, this has not been implemented as a UIMAPI method.
As an alternative, the last time a device generated a metric can be obtained from the corresponding QoS table, particularly by running a select max(sampletime) from the corresponding Raw table.
For example, we want to determine the last time a device named 'apmserver' sent metrics for QOS_CPU_USAGE:
First, we determine the table where the raw data is stored:
select r_table from s_qos_data
where qos='QOS_CPU_USAGE' and source='apmserver' and target='apmserver'
We will get the name of the raw table, for example, RN_QOS_DATA_0016
Then, we obtain the last time data was sent to that raw table:
select max(sampletime) from RN_QOS_DATA_0016