Product Information
SAP ALM Analytics: How to use the SAP Focused RUN REST Advanced Analytics API (part2)
The FRUN AAI REST interface (available since SAP Focused Run 3.0 FP01) provides external access to most of the SAP Focused Run metrics in time-series format: A time series is a group of measurements on a single entity over time. (ex: average cpu for host for the last hour per minute).
In this series of blogs, you can find a description of existing data providers with their different filters available in SAP Focused Run:
This blog focuses on the following data providers:
- Synthetic User Monitoring
- Real User Monitoring
DP Provider Name: DP_SYSMON
This provider retrieves data managed by the SAP Focused RUN Synthetic User Monitoring use case.
Payload Example
{“format”:”time_series”,”timestampFormat”:”unix”,”timeRange”:{“semantic”:”C24H”,”from”:”20221208135839″,”to”:”20221209135839″},”resolution”:”H”,”timezone”:”+01:00″,
“queries”:[{“name”:”myQuery”,”provider”:”DP_SUM“,”columns”:{“dimensions”:[],”metrics”:[]},”filters”:[{“key”:”METRIC_NAMES“,”values”:[“STATUS_COUNT_ANALYTICS“]},{“key”:”ROBOT_ID“,”values”:[“C71FE45FB858507980DAF481962A63C6“]}],”refId”:”A”}]}
Filters
Filters | Description | Comment |
METRIC_NAMES | Name of the metrics | Possible Values: STATUS_COUNT_ANALYTICS: percentage of successful scripts executions. STEP_PERFORMANCE: response time of the script execution. |
ROBOT_ID | Robot ID | GUID of the Robots |
SCRIPT_ID | Script ID | GUID of the Scripts |
STEP_ID | Step ID | GUID of the script’s steps |
METHOD | Aggregation method to apply to the metrics | Possible values: SUM, MAX, MIN, COUNT |
DRILLDOWN | When applicable perform a drill-down on the script | Possible values: ROBOTS |
Example
Requests
{
"request": {
"method": "POST",
"url": "<to be changed>",
"data": {
"format": "time_series",
"timestampFormat": "unix",
"timeRange": {
"semantic": "C24H",
"from": "20221208163106",
"to": "20221209163106"
},
"resolution": "H",
"timezone": "+01:00",
"queries": [
{
"name": "my query",
"provider": "DP_SUM",
"columns": {
"dimensions": [],
"metrics": []
},
"filters": [
{
"key": "METRIC_NAMES",
"values": [
"STATUS_COUNT_ANALYTICS"
]
},
{
"key": "SCRIPT_ID",
"values": [
"C36B7CBF04255F10ACA8360889AAE52C"
]
},
{
"key": "DRILLDOWN",
"values": [
"ROBOTS"
]
}
],
"refId": "A"
}
]
},
"hideFromInspector": false
},
Response
"response": [
[
{
"serieName": "my query -prod",
"attributes": [
{
"key": "ROBOT_ID",
"value": "4A4156BC455A53A98F87323D4823BCBD"
},
{
"key": "ROBOT_NAME",
"value": "prod"
}
],
"dataPoints": [
[
100,
1670511600000
],
[
100,
1670515200000
],
[
-1,
1670518800000
],
...
[
100,
1670598000000
]
]
},
{
"serieName": "my query -dev",
"attributes": [
{
"key": "ROBOT_ID",
"value": "A6F7C0615AE75F608F87A7C5703B2256"
},
{
"key": "ROBOT_NAME",
"value": "dev"
}
],
"dataPoints": [
[
-1,
1670515200000
],
[
-1,
1670518800000
],
....
[
-1,
1670598000000
]
]
}
]
]
}
DP Provider Name: DP_RUM
This provider retrieves data managed by the SAP Focused RUN Real User Monitoring use case.
Payload Example
{“format”:”time_series”,”timestampFormat”:”unix”,”timeRange”:{“semantic”:”C72H”,”from”:”20221206171253″,”to”:”20221209171253″},”resolution”:”H”,”timezone”:”+01:00″,
“queries”:[{“name”:”Eu10 Users”,”provider”:”DP_RUM“,”columns”:{“dimensions”:[],”metrics”:[]},”filters”:[{“key”:”GROUP_ID“,”values”:[“FA163E1B092C1EDC938722488FA47D16“]},{“key”:”METRIC_NAMES“,”values”:[“USERS_LOAD“]}],”refId”:”A”}]}
Filters
Filters | Description | Comment |
METRIC_NAMES | Name of the metrics | Possible Values: NB_EXECUTIONS: number of executions USERS_LOAD: number of users. RESPONSE_TIME: average response time RED_EXECUTIONS: number of execution with critical performances |
METHOD | aggregation method for the response time metrics. | Possible Values: AVG, MAX, MIN |
GROUP_ID | Robot ID | GUID of the Robots. |
REQUEST_ID | Requests ID | Filter on the GUID of the requests of the selected groups. |
DRILLDOWN | When applicable perform a drill-down on the selected dimensions | Possible values: LOCATION: users location TYPES: request types REQUESTS: requests instances |
GUID |
System ID | GUID of the system belonging to the group. |
Examples
Request
{
"request": {
"method": "POST",
"url": "<to be changed>",
"data": {
"format": "time_series",
"timestampFormat": "unix",
"timeRange": {
"semantic": "C72H",
"from": "20221206201613",
"to": "20221209201613"
},
"resolution": "H",
"timezone": "+01:00",
"queries": [
{
"name": "Eu10 Users",
"provider": "DP_RUM",
"columns": {
"dimensions": [],
"metrics": []
},
"filters": [
{
"key": "GROUP_ID",
"values": [
"FA163E1B092C1EDC938722488FA47D16"
]
},
{
"key": "METRIC_NAMES",
"values": [
"USERS_LOAD"
]
}
],
"refId": "A"
}
]
},
"hideFromInspector": false
},
Response:
"response": [
[
{
"serieName": "Eu10 Users",
"attributes": [
{
"key": "SYS_ID",
"value": ""
},
{
"key": "METRIC",
"value": "USERS_LOAD"
},
{
"key": "TYPE",
"value": ""
}
],
"dataPoints": [
[
43,
1670353200000
],
...
[
17,
1670612400000
]
]
}
]
]
}
Thanks for reading.