Retrieving Percentage of Proactive Alarms in the Target Environment

Use the URL specified below to retrieve the percentage of proactive alarms for all component types, components, layers and tests specific to the target environment. The percentage is calculated by considering the count of Major and Minor alarms against the Total alarms raised in the target environment.

Retrieving Percentage of Proactive Alarms across Component Types

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

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":"2 weeks"

}

Body

Default:

{

"timeline":"Timeline for retrieving proactive alarm percent (in hours/days/weeks)"

}

 

Success Response

Type

Code

Content

JSON

200

{

"Proactive Problem Percent": [

{

"componentType": "Linux server,MySql",

"proactivePercent": "100"

},

{

"componentType": "Apache CouchDB",

"proactivePercent": "44"

},

.

.

.

}

 

Failure Response
Type Code Content

JSON

401 UNAUTHORIZED

{"code": 401,"error": "Invalid username or password"}

JSON

400 BAD REQUEST

You may receive one of the following responses:

{"code": 400,"error": " Bad Request. Header parameters : Username or Password or Manager Url is missing"} (or)

{"code": 400,"error": " Bad Request. Manager Url,Username,password is not provided"} (or)

{"code": 400,"error": " Component type not associated with this user"} (or)

{"code": 400,"error": "No components associated for this user"} (or)

{"code": 400,"error": "Provide a space between value and unit in Timeline"} (or)

{"code": 400,"error": "Invalid Timeline. Please refer EG REST API documentation for this API"}

JSON

500 Server Error

{"code": 500,"error": " Server Error. Please check /manager/logs/error_log in the installation directory for more information"}

 

Figure 1 : Retrieving the percentage of proactive alarms for all Component Types using Postman REST Client

Retrieving Percentage of Proactive Alarms across Component Types using cURL

To retrieve the percentage of proactive alarms across all component types managed in the target environment using cURL, the command should be specified in the following format:

curl -L -X POST "http://<eG Manager IP:Port>/api/eg/analytics/getProactiveProblemPercent/servertype" -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 proactive alarm percent(in hours/days/weeks)\"}"

Figure 2 shows an example of retrieving the percentage of proactive alarms for all component types managed in the target environment using cURL.

Figure 2 : Retrieving the percentage of proactive alarms for all Component Types using cURL

Retrieving Percentage of Proactive Alarms across all Components

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

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":"2 weeks"

}

Body

Default:

{

"timeline":"Timeline for retrieving proactive alarm percent (in hours/days/weeks)"

}

 

Success Response
Type Code Content

JSON

200

{

"proactiveProblemPercent": [

{

"componentName": "CTXCONNECTSRV",

"proactivePercent": "0"

},

{

"componentName": "PostgreSQL_10.68:5432",

"proactivePercent": "100"

},

.

.

.

}

 

Failure Response
Type Code Content

JSON

401 UNAUTHORIZED

{"code": 401,"error": "Invalid username or password"}

JSON

400 BAD REQUEST

You may receive one of the following responses:

{"code": 400,"error": " Bad Request. Header parameters : Username or Password or Manager Url is missing"} (or)

{"code": 400,"error": " Bad Request. Manager Url,Username,password is not provided"} (or)

{"code": 400,"error": " Component type not associated with this user"} (or)

{"code": 400,"error": "No components associated for this user"} (or)

{"code": 400,"error": "Provide a space between value and unit in Timeline"} (or)

{"code": 400,"error": "Invalid Timeline. Please refer EG REST API documentation for this API"}

JSON

500 Server Error

{"code": 500,"error": " Server Error. Please check /manager/logs/error_log in the installation directory for more information"}

 

Figure 3 : Retrieving the percentage of proactive alarms for all Components using Postman REST Client

Retrieving Percentage of Proactive Alarms across Components using cURL

To retrieve the percentage of proactive alarms across all components managed in the target environment using cURL, the command should be specified in the following format:

curl -L -X POST "http://<eG Manager IP:Port>/api/eg/analytics/getProactiveProblemPercent/servername" -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 proactive alarm percent(in hours/days/weeks)\"}"

Figure 2 shows an example of retrieving the percentage of proactive alarms for all components managed in the target environment using cURL.

Figure 4 : Retrieving the percentage of proactive alarms for all Components using cURL

Retrieving Percentage of Proactive Alarms specific to Layers of a Component Type

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

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":"2 weeks",

"componentType":"Apache CouchDB"

}

Body

Default:

{

"timeline":"Timeline for retrieving proactive alarm percent (in hours/days/weeks)",

"componentType":"Component Type"

}

 

Success Response
Type Code Content

JSON

200

{

"proactiveProblemPercent": [

{

"layer": "Network",

"proactivePercent": "40"

},

{

"layer": "Application Processes",

"proactivePercent": "42"

},

.

.

.

}

 

Failure Response
Type Code Content

JSON

401 UNAUTHORIZED

{"code": 401,"error": "Invalid username or password"}

JSON

400 BAD REQUEST

You may receive one of the following responses:

{"code": 400,"error": " Bad Request. Header parameters : Username or Password or Manager Url is missing"} (or)

{"code": 400,"error": " Bad Request. Manager Url,Username,password is not provided"} (or)

{"code": 400,"error": " Component type not associated with this user"} (or)

{"code": 400,"error": "No components associated for this user"} (or)

{"code": 400,"error": "Provide a space between value and unit in Timeline"} (or)

{"code": 400,"error": "Invalid Timeline. Please refer EG REST API documentation for this API"}

JSON

500 Server Error

{"code": 500,"error": " Server Error. Please check /manager/logs/error_log in the installation directory for more information"}

Figure 5 : Retrieving the percentage of proactive alarms for the layers of a component type using Postman REST Client

Retrieving Percentage of Proactive Alarms specific to Layers of a Component Type using cURL

To retrieve the percentage of proactive alarms specific to layers of a component type managed in the target environment using cURL, the command should be specified in the following format:

curl -L -X POST "http://<eG Manager IP:Port>/api/eg/analytics/getProactiveProblemPercent/layer" -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 proactive alarm percent(in hours/days/weeks)\",\"componentType\":\"Component Type\"}"

Figure 2 shows an example of retrieving the percentage of proactive alarms for the layers specific to a component type managed in the target environment using cURL.

Figure 6 : Retrieving the percentage of proactive alarms for the layers of a component type using cURL