Processing Data From a REST API JSON Format

How to process data from a REST API JSON format using Monitoring Studio.

Related Topics

Introduction

In this article, we will assume that a Web request has been configured in Monitoring Studio to obtain the local VDC disk details of an EMC ECS storage system. The response data is in JSON format as shown below:

dashboard-zones-localzone-disks.json file

From this response data, we want to extract the StoragePoolName, the healthStatus, and the displayName information (the properties) located under _embedded/_instances (the JSON entry key). This article explains how to do it using Monitoring Studio.

Procedure

To process the response data in JSON format:

  1. Right-click the Web Request instance and click KM Commands > New > Text Pre-Processing
  2. Select Convert JSON to CSV (Comma-Separated Values) and click Next

Selecting the conversion to perform 3. Specify the JSON entry key and the properties:

Specifying the JSON entry key and properties

In our example:

  • the JSON entry key is _embedded/_instances
  • the properties are StoragePoolName;healthStatus;displayName
  1. Click Next
  2. Configure the Monitor Settings and click Finish.

Configuring the Monitor Settings

If you would like to retrieve more parameters involving complex data structures like multiple arrays, please refer to the [EMC Elastic Cloud template](/kb/1219/index.html). You will just have to import and edit the existing configuration to know how the properties to be extracted can be defined.