Product Information
SAP ALM Analytics: How to use the SAP Focused RUN REST Advanced Analytics API
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).
This API is a generic time-series API using a concept called Data Provider:
The data provider is an abstract layer for accessing different SAP Focused RUN data sources with the same protocol:
This protocol include the following elements:
- Time periods: Time period to apply to the time series.
- Resolutions. The resolution of the time series.
- Providers: The identifier of the data source.
- Filters. The filters used to restrict the content of the time series.
The list of filters available depends on the selected provider.
The result of the API contains:
- Attributes: A set of key-values pair describing the entity for which the measurements have been observed.
- Data Points: A collection of data points indexed in time order.
Please note that the format of this API is compatible with the SAP Cloud ALM Analytics API documented SAP API Hub with the the following restrictions:
- The columns attributes containing dimensions and metrics are not supported by the SAP Focused RUN implementation.
- The table “format” is not supported by the SAP Focused RUN implementation.
- The name of the series returned by the SAP Focused RUN implementation uses a different naming rules:
- Single Series: <name>-[<ATTRIBUTES>~]*
- Multiple Series: the name of the series is formatted by the different data providers
Data Providers
In the following, you can find a description of existing data providers with their different filters available in SAP Focused Run:
- System Monitoring
- Health Monitoring Availability
- Health Monitoring Application Check
DP Provider Name: DP_SYSMON
This provider retrieves data managed by the SAP Focused RUN System Monitoring use case.
Payload Example:
{“format”:”time_series”,”timestampFormat”:”unix”,”timeRange”:{“semantic”:”C2H”,”from”:”20221104093015″,”to”:”20221104113015″},”resolution”:”R”,”timezone”:”+01:00″,”queries”:[{“name”:””,”provider”:”DP_SYSMON“,”columns”:{“dimensions”:[],”metrics”:[]},”filters”:[{“key”:”GUID“,”values”:[“98f2b203-2cd3-1eab-a010-c47df058b45a“]},{“key”:”METRIC_NAMES“,”values”:[“CPU_USER_UTILIZATION“]}],”refId”:”B”}]}
Filters:
Filters | Description | Comment |
GUID | Extended ID of the system | GUID of the system |
METRIC_NAMES | Name of the metrics | |
EVENT_NAMES | Name of the events | |
CONTEXT_ID | Managed Object ID | GUID of the Managed Object |
METHOD | Aggregation method to apply to the metrics | Possible values: SUM, MAX, MIN, COUNT |
DRILLDOWN | When applicable perform a drill-down on the managed object | Possible values: HOST, INSTANCE |
Example:
Request:
{
"request": {
"method": "POST",
"url": "<to be changed>",
"data": {
"format": "time_series",
"timestampFormat": "unix",
"timeRange": {
"semantic": "C6H",
"from": "20221130121512",
"to": "20221130181512"
},
"resolution": "H",
"timezone": "+01:00",
"queries": [
{
"name": "",
"provider": "DP_SYSMON",
"columns": {
"dimensions": [],
"metrics": []
},
"filters": [
{
"key": "GUID",
"values": [
"fa163e1b-092c-1eea-bd88-42acba4bdb86"
]
},
{
"key": "METRIC_NAMES",
"values": [
"CPU_SYSTEM_UTILIZATION"
]
},
{
"key": "DRILLDOWN",
"values": [
"HOST"
]
}
]
}
]
},
}
Response:
"response": [
[
{
"serieName": " -CLPCLM (ABAP)~spwdfvml3101~CPU System Utilization",
"attributes": [
{
"key": "METRIC_NAMES",
"value": "CPU_SYSTEM_UTILIZATION"
},
{
"key": "CONTEXT_ID",
"value": "FA163E1B092C1EDABDEB2BE08E9CDE83"
},
{
"key": "MANAGED_OBJ_NAME",
"value": "spwdfvml3101"
},
{
"key": "METRIC_ID",
"value": "0050568E6E9A02DE83C120FAB30649B9"
},
{
"key": "ROOT_CONTEXT_NAME",
"value": "CLPCLM (ABAP)"
},
{
"key": "ROOT_CONTEXT_ID",
"value": "fa163e1b-092c-1eea-bd88-42acba4bdb86"
},
{
"key": "DRILLDOWN",
"value": "DETAIL"
}
],
"dataPoints": [
[
1.01,
1669806900000
],
[
1.03,
1669810500000
],
[
1.05,
1669814100000
],
[
1.03,
1669817700000
],
[
1.01,
1669821300000
],
[
0.91,
1669824900000
]
]
},
{
"serieName": " -CLPCLM (ABAP)~spwdfvml3103~CPU System Utilization",
"attributes": [
{
"key": "METRIC_NAMES",
"value": "CPU_SYSTEM_UTILIZATION"
},
{
"key": "CONTEXT_ID",
"value": "FA163E1B092C1EEABD8842ACBA4EFB86"
},
{
"key": "MANAGED_OBJ_NAME",
"value": "spwdfvml3103"
},
{
"key": "METRIC_ID",
"value": "0050568E6E9A02DE83C120FAB30649B9"
},
{
"key": "ROOT_CONTEXT_NAME",
"value": "CLPCLM (ABAP)"
},
{
"key": "ROOT_CONTEXT_ID",
"value": "fa163e1b-092c-1eea-bd88-42acba4bdb86"
},
{
"key": "DRILLDOWN",
"value": "DETAIL"
}
],
"dataPoints": [
[
1.88,
1669806900000
],
[
1.95,
1669810500000
],
[
1.94,
1669814100000
],
[
1.88,
1669817700000
],
[
1.97,
1669821300000
],
[
1.88,
1669824900000
]
]
}
]
]
}
DP Provider Name: DP_OCMON
This provider retrieves data managed by the SAP Focused RUN Health Monitoring Availability use case.
Payload Example:
{“format”:”time_series”,”timestampFormat”:”unix”,”timeRange”:{“semantic”:”C6H”,”from”:”20221201091650″,”to”:”20221201151650″},”resolution”:”H”,”timezone”:”+01:00″,”queries”:[{“name”:”label”,”provider”:”DP_OCMON“,”columns”:{“dimensions”:[],”metrics”:[]},”filters”:[{“key”:”CUSTOMER_NETWORK“,”values”:[“CLM“]},{“key”:”TYPE“,”values”:[“URL_AVAIL“]},{“key”:”CONTEXT_METRIC“,”values”:[“FA163E1B092C1EDBBF87A90EE36A39EC~PROD – collector“]}]}]}
Filters:
Filters | Description | Comment |
CUSTOMER_NETWORK | ID of the customer network | GUID of the customer network |
TYPE | Type of application | Possible Values: HTTP Availability, RFC Availability, TCP Availability, Windows Service, OS Processes |
DESTINATION | Component to be validated | |
CONTEXT_METRIC | ID of the destination | GUID of the destination |
METRIC | Name of the metric | Possible Values: Availability Percentage, Status Code, Certificate Validity, Response Time |
Example:
Request:
{
"request": {
"method": "POST",
"url": "...",
"data": {
"format": "time_series",
"timestampFormat": "unix",
"timeRange": {
"semantic": "C6H",
"from": "20221201093607",
"to": "20221201153607"
},
"resolution": "H",
"timezone": "+01:00",
"queries": [
{
"name": "my serie",
"provider": "DP_OCMON",
"columns": {
"dimensions": [],
"metrics": []
},
"filters": [
{
"key": "CUSTOMER_NETWORK",
"values": [
"CLM"
]
},
{
"key": "TYPE",
"values": [
"URL_AVAIL"
]
},
{
"key": "METRIC",
"values": [
"RESP"
]
},
{
"key": "CONTEXT_METRIC",
"values": [
"FA163E1B092C1EDBBF87A90EE36A39EC~PROD - collector (EU10)"
]
}
]
}
]
}
}
Response:
"response": [
[
{
"serieName": "my serie",
"attributes": [
{
"key": "CUSTOMER",
"value": "Cloud ALM (CLM)"
},
{
"key": "METRIC_NAME",
"value": "PROD - collector (EU10)"
},
{
"key": "DESTINATION",
"value": "PROD - collector (EU10)"
},
{
"key": "TYPE",
"value": "HTTP Availabilty"
},
{
"key": "METRIC",
"value": "Response time"
}
],
"dataPoints": [
[
264.67,
1669881600000
],
[
168.9,
1669885200000
],
[
148.87,
1669888800000
],
[
421.45,
1669892400000
],
[
243.72,
1669896000000
],
[
143.78,
1669899600000
],
[
169.11,
1669903200000
]
]
}
]
]
}
DP Provider Name: DP_HEALTHMONITORING
This provider retrieves data managed by the SAP Focused RUN Health Monitoring Application Check use case.
Payload Example:
{“format”:”time_series”,”timestampFormat”:”unix”,”timeRange”:{“semantic”:”C6H”,”from”:”20221201095755″,”to”:”20221201155755″},”resolution”:”H”,”timezone”:”+01:00″,”queries”:[{“name”:”my serie”,”provider”:”DP_HEALTH_MONITORING“,”columns”:{“dimensions”:[],”metrics”:[]},”filters”:[{“key”:”CUSTOMER_ID“,”values”:[“LOCALNETWORK“]},{“key”:”DESTINATION“,”values”:[“FA163E1B092C1EDB9ACB383D252D7CA5“]},{“key”:”METRIC_ID“,”values”:[“cf.memory.usage”]},{“key”:”LABEL“,”values”:[“Application:aos-srv;InstanceNumber:instance#0“]},{“key”:”KPI“,”values”:[“LIMIT“]}],”refId”:”A”}]}
Filters:
Filters | Description | Comment |
CUSTOMER_ID | ID of the customer network | |
DESTINATION | ID of the application | |
METRIC_ID | Metric | GUID of the Metric |
LABEL | Label of the destination | |
KPI | KPI of the metric | Possible values: Value, Limit, Usage, Calculated Rating |
Example:
Requests:
{
"request": {
"method": "POST",
"url": "...",
"data": {
"format": "time_series",
"timestampFormat": "unix",
"timeRange": {
"semantic": "C6H",
"from": "20221201110840",
"to": "20221201170840"
},
"resolution": "H",
"timezone": "+01:00",
"queries": [
{
"name": "my serie",
"provider": "DP_HEALTH_MONITORING",
"columns": {
"dimensions": [],
"metrics": []
},
"filters": [
{
"key": "CUSTOMER_ID",
"values": [
"LOCALNETWORK"
]
},
{
"key": "DESTINATION",
"values": [
"FA163E1B092C1EDB9ACB383D252D7CA5"
]
},
{
"key": "METRIC_ID",
"values": [
"cf.memory.usage"
]
},
{
"key": "LABEL",
"values": [
"Application:aos-srv;InstanceNumber:instance#0"
]
},
{
"key": "KPI",
"values": [
"VALUE"
]
}
],
}
]
}
}
Responses:
"response": [
[
{
"serieName": "my serie",
"attributes": [
{
"key": "DESTINATION",
"value": "SAP Cloud ALM:PROD"
},
{
"key": "METRIC_NAME",
"value": "cf.memory.usage"
},
{
"key": "VALUES",
"value": "Application:aos-srv;InstanceNumber:instance#0"
},
{
"key": "KPI",
"value": "VALUE"
},
{
"key": "CUSTOMER",
"value": "LOCALNETWORK"
},
{
"key": "LABEL",
"value": "Application:aos-srv;InstanceNumber:instance#0"
}
],
"dataPoints": [
[
701.94,
1669888800000
],
[
892.35,
1669892400000
],
[
882.65,
1669896000000
],
[
872.63,
1669899600000
],
[
873.01,
1669903200000
],
[
906.88,
1669906800000
]
]
}
]
]
}
Thanks for reading.
Hello Xavier DUPEYRAT, Thanks for the details in the blog very helpful. Can you give one scenario where you have called this API to create dashboards etc.
Hello,
We are using the Focused RUN REST API to build Operation Control Center, Monitoring Console and/or Service Level Report with external dashboarding tools.
Xavier.