I am interested in get the data for the last hour for a source qos using webservices_rest. What would be an example of that?
Release : 20.3
Component : UIM - WEBSERVICES_REST
A good way to ensure that you have the correct syntax would be to use a query like the following to determine the correct information to plug into the command:
SELECT def.source,
def.probe,
cb.met_description,
def.target,
def.qos,
snap.samplevalue,
snap.sampletime,
def.r_table,
def.table_id FROM S_QOS_DATA AS def
join cm_configuration_item_metric cm on cm.ci_metric_id=def.ci_metric_id
join cm_configuration_item_metric_definition cb on cm.ci_metric_type=cb.met_type
JOIN S_QOS_SNAPSHOT AS snap ON snap.table_id = def.table_id
WHERE snap.[sampletime] > dateadd(hour, -1, getdate())
AND def.source like '%<part of the source name>%' order by def.qos asc
This query will also tell you that you have actually had data for the source that you are trying to run your rest command against.
From this we can put together the command:
http://10.10.10.10/rest/qos/data/name/QOS_CPU_MULTI_USAGE/test01/System-2/lasthour/now/0
with example output looking like:
webservices_rest call reference:
Other samples:
Get Historical QoS Data (Aggregated)
http://<webservices_rest server name or IP>/rest/qos/data/name/QOS_CPU_USAGE/P-H/lvntest001108/201901010101/202012020101/20/historical
Get Raw QoS Data
http://<webservices_rest server name or IP>/rest/qos/data/name/QOS_POWER_STATE/CABI/CABI/202101060000/202108060000/0/