Analyzing data trends by extracting time series data
Scenario
Paul is a capacity planner in an IT organization. He manages and monitors the infrastructure capacity to make sure that the infrastructure has sufficient resources to meet current and future demands. Paul wants to analyze the time series data of Kubernetes pods to plan for the capacity changes in the Kubernetes infrastructure.
Benefits
After analyzing the time series data of Kubernetes pods, Paul can add or remove resources to optimize the capacity of Kubernetes infrastructure. For example, he can add additional virtual machines to the Kubernetes cluster for which the capacity-specific parameters are nearing saturation.
Workflow
Paul needs to make sure that he has access to the APIs. He requests Alan, who is an administrator, to provide access to the APIs. Alan generates the access keys and shares them with Paul. Paul generates the JSON Web Token (JWT) that is required for authentication by using these keys. For more information, see Access-and-authentication-for-the-REST-API.
Task 1: Search for the time series identifiers
Paul needs to find out the time series identifier. He performs the catalog search queries to obtain this identifier. He can filter the search to obtain the identifiers of some specific entities by using entity filters. For example, he can filter the search based on the entity ID, name, status, and tag. He makes the following API call:
POST https://<BMC Helix Portal URL>/opt/api/v1/catalog/search
Example: POST https://host1.bmc.com/opt/api/v1/catalog/search
Parameters | Example |
---|---|
Request body | |
Response |
From this response, Paul notes down the resource ID.
Task 2: Extract the time series data
Paul uses the resource ID obtained in the previous step to extract the time series data. He uses the following API call.
POST https://<BMC Helix Portal URL>/opt/api/v1/htsreader/timeseries/queries
Example: POST https://host1.bmc.com/opt/api/v1/htsreader/timeseries/queries
Parameters | Example |
---|---|
Request body | |
Response |
Results
Paul can use this time series data in any of the external tools and analyze it.