Retrieving Configuration Changes Over Time
Using the eG REST API, administrators can figure out exact time on which configuration changes were made to the components belonging to a Zone/Service/Segment/Component Type without logging into the eG console. The table below specifies the URL and the parameters that should be used to retrieve the health of the infrastructure.
URL: http://<eG manager IP:port>/api/eg/analytics/getConfigurationChangesOverTime
Method: POST
Content-Type: application/json
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 |
Example to retrieve the configuration changes of components over a chosen time period "filterBy":"component", "componentType":"Microsoft Windows", "timeline":"3 days" } Example to retrieve the configuration changes of the components belonging to a zone over a chosen time period: { "filterBy":"zone", "zone":"SENTHIL-Oracle.Zone", "componentType":"Microsoft Windows", "timeline":"3 days" } |
Body |
Default: { "filterBy":"zone/service/segment/component", "zone":"Name of Zone", "service":"Name of Service", "segment":"Name of Segment", "componentType":"Name of Component Type", "timeline":"Timeline for retrieving the data (in hours/days/weeks)" } |
Type | Code | Content |
---|---|---|
JSON |
200 |
{ "totalChanges": 6, "data": [ { "date": "08/31/2022", "value": 0 }, { "date": "09/01/2022", "value": 3 }, { "date": "09/02/2022", "value": 3 }, { "date": "09/03/2022", "value": 0 } ] } |
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": "Provide a space between value and unit in Timeline"} (or) {"code": 400,"error": "Invalid Timeline. Please refer EG REST API documentation for this API."} (or) {"code": 400,"error": "filterBy is not provided"} (or) {"code": 400,"error": "Invalid value for FilterBy"} (or) {"code": 400,"error": "Service name is not available/ not associated with this user"} (or) {"code": 400,"error": "Zone name is not available/ not associated with this user"} (or) {"code": 400,"error": "Segment name is not available/ not associated with this user"} (or) {"code": 400,"error": "Component Type is not available/ not associated with this user"} |
JSON |
500 Server Error |
{"code": 500,"error": "Server Error. Please check /manager/logs/error_log in the installation directory for more informatio"} |
Figure 1 : Retrieving the configuration changes made to components over a chosen time period using Postman REST Client
Retrieving Infrastructure Health using cURL
To retrieve the configuration changes that were made to the components belonging to a Zone/Service/Segment/Component Type over a chosen time period using cURL, the command should be specified in the following format:
curl -L -X POST "http://<eG Manager IP:Port>/api/eg/analytics/getConfigurationChangesOverTime" -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 "{\"filterBy\":\"zone/service/segment/component\",\"zone\":\"Name of zone\",\"service\":\"Name of service\",\"segment\":\"Name of segment\",\"componentType\":\"Name of Component Type\",\"timeline\":\"Timeline for retrieving the data (in hours/days/weeks)\"}”
Figure 2 shows an example of retrieving the configuration changes that were made to the components managed in the target environment over a chosen time period using cURL.
Figure 2 : Retrieving the configuration changes made to the components over a chosen time period using cURL