Retrieving the Count of Events from Alarm History

Using the eG REST API, administrators can retrieve the count of events from Alarm History for all component types, components, layers and tests specific to the target environment.

Retrieving the Count of Events from Alarm History for all Component Types

URL: http://<eG manager IP:port>/api/eg/analytics/getEventCount/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":"1 hour"

}

Body

Default:

{

"timeline":"Timeline for retrieving the count of events (in hours/days/weeks)"

}

 

Success Response
Type Code Content

JSON

200

{

"Event Count": [

{

"Server Type": "Java Application",

"Event Count": "54"

},

{

"Server Type": "eG Manager",

"Event Count": "137"

},

.

.

.

}

 

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 count of events from Alarm History for all Component Types using Postman REST Client

Retrieving the Count of Events from Alarm History for all Component Types using cURL

To retrieve the count of events for all Component Types using cURL, the command should be specified in the following format:

curl -location -request POST "http://<eG Manager IP:Port>/api/eg/analytics/getEventCount/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 the count of events (in hours/days/weeks)\"}"

Figure 2 shows an example of retrieving the count of events recorded for all Components Types using cURL.

Figure 2 : Retrieving count of events from Alarm History for all Component Types using cURL

Retrieving the Count of Events for all Components

URL: http://<eG manager IP:port>/api/eg/analytics/getEventCount/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":"1 hour"

}

Body

Default:

{

"timeline":"Timeline for retrieving the count of events(in hours/days/weeks)"

}

 

Success Response
Type Code Content

JSON

200

{

"Event Count": [

{

"Server Name": "esx51-15",

"Event Count": "185"

},

{

"Server Name": "win183",

"Event Count": "12"

},

.

.

.

}

 

Failure Response
Type Code Content

JSON

401 UNAUTHORIZED

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

JSON

500 Server Error

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

 

Figure 3 : Retrieving count of events from Alarm History for all Components using Postman REST Client

Retrieving the Count of Events for all Components using cURL

To retrieve the count of events for all Components using cURL, the command should be specified in the following format:

curl -location -request POST "http://<eG Manager IP:Port>/api/eg/analytics/getEventCount/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 the count of events (in hours/days/weeks)\"}"

Figure 2 shows an example of retrieving the count of events from Alarm History for all Components using cURL.

Figure 4 : Retrieving count of events from Alarm History for all Components using cURL

Retrieving the Count of Events from Alarm History specific to Layers of a Component Type

URL: http://<eG manager IP:port>/api/eg/analytics/getEventCount/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":"1 hour",

"servertype":"Microsoft Windows"

}

Body

Default:

{

"timeline":"Timeline for retrieving the count of events (in hours/days/weeks)",

"servertype":"Component Type"

}

 

Success Response
Type Code Content

JSON

200

{

"Event Count": [

{

"Layer Name": "Operating System",

"Event Count": "3"

},

{

"Layer Name": "Oracle Service",

"Event Count": "2"

},

.

.

.

}

 

Failure Response
Type Code Content

JSON

401 UNAUTHORIZED

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

JSON

500 Server Error

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

 

Figure 5 : Retrieving count of events from Alarm History for the layers of a component type using Postman REST Client

Retrieving the Count of Events from Alarm History specific to Layers of a Component Type using cURL

To retrieve the count of events that are specific to layers of a component type using cURL, the command should be specified in the following format:

curl -location -request POST "http://<eG Manager IP:Port>/api/eg/analytics/getEventCount/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 the count of events (in hours/days/weeks)\",\"servertype\":\"Component Type\"}"

Figure 2 shows an example of retrieving the count of events from Alarm History for the layers of a chosen component type using cURL.

Figure 6 : Retrieving count of events from Alarm History for the layers of a component type using cURL

Retrieving the Count of Events from Alarm History specific to Tests of a Component Type

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

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",

"servertype":"Microsoft Windows"

}

Body

Default:

{

"timeline":"Timeline for retrieving the count of events (in hours/days/weeks)",

"servertype":"Component Type"

}

 

Success Response
Type Code Content

JSON

200

{

"Event Count": [

{

"Test Name": "Network",

"Event Count": "1"

},

{

"Test Name": "Oracle SGA",

"Event Count": "35"

},

.

.

.

}

 

Failure Response
Type Code Content

JSON

401 UNAUTHORIZED

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

JSON

500 Server Error

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

Figure 7 : Retrieving count of events from Alarm History for the tests of a component type using Postman REST Client

Retrieving the Count of Events from Alarm History specific to Tests of a Component Type using cURL

To retrieve the count of events from Alarm History that are specific to tests of a component type using cURL, the command should be specified in the following format:

curl -location -request POST "http://<eG Manager IP:Port>/api/eg/analytics/getEventCount/test" -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 count of events (in hours/days/weeks)\",\"servertype\":\"Component Type\"}"

Figure 2 shows an example of retrieving the count of events from Alarm History for the tests of a chosen component type using cURL.

Figure 8 : Retrieving count of events from Alarm History for the tests of a component type using cURL