Retrieving Top-N Analysis Data

To identify the best/worst players in a particular performance area, administrators need to rank components/descriptors for every metric collected by the eG Enterprise. For such ranking, administrators need to figure out the Top-N Analysis data offered by eG Enterprise. Using the eG REST API, administrators can figure out the Top-N data of the components/descriptors of a measure reported by eG Enterprise without logging into the eG console. The table below specifies the parameters that should be used to retrieve the health of the infrastructure.

URL: http://<eG manager IP:port>/api/eg/analytics/getTopNData

Method: POST

Content-Type: application/json

Inputs to be Specified
Parameters Key values Example

Headers

managerurl: Base URL of the eG Manager i.e., http://<IP address of the eG console:Port>

user: eG username or domain/eG username

pwd: Base64 encoded password

{

"timeline":"1 hour",

"server":"win112:NULL:Microsoft Windows",

"test":"Disk Activity",

"descriptor":"Disk0 C:",

"measure":"Disk busy"

}

Body

Default:

{

"timeline":"Timeline for retrieving the measure data (in hours/days/weeks)",

"server":"Component Type:Component name:Port/Null",

"test":"Test name",

"measure":"Measure name",

"descriptor":"Descriptor name"

}

 

Success Response
Type Code Content

JSON

200

[

{

"Name": "win183 {Disk0 C: D:}",

"Value": "7.5"

}

]

 

Failure Response
Type Code Content

JSON

401 UNAUTHORIZED

{"code": 401,"error": "Unauthorized user"}

JSON

500 Server Error

{"code": 500,"error": " Server Error "}

Figure 1 : Retrieving Top-N Analysis Data using Postman REST Client

Retrieving Top-N Analysis Data using cURL

To retrieve the Top-N Data of components/descriptors using cURL, the command should be specified in the following format:

curl -location -request POST "http://<eG Manager IP:Port>/api/eg/analytics/getTopNData" -H "user:<eG username or domain/eG username>" -H "pwd:Base64 encoded password" -H "managerurl:http://<eG Manager IP:Port>" -H"Content-Type:application/json" --data-raw "{\"timeline\":\"Timeline for retrieving the Top-N data (in hours/days/weeks)\",\"server\":\"Component Type:Component name:Port\",\"test\":\"Test name\",\"measure\":\"Measure name\",\"descriptor\":\"Descriptor name\"}"

Figure 2 shows an example of retrieving the Top-N Analysis Data using cURL.

Figure 2 : Retrieving Top-N Analysis Data using cURL