Adding Remote Agents
Use this API to add remote agents for monitoring to the eG manager.
URL: http://<eG manager IP:port>/api/eg/orchestration/addremoteagent
Method: POST
Content-Type: application/json
Parameters | Key values | Example |
---|---|---|
Header |
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 with Default key values: { "hostip":"192.168.8.192", "agentname":"remote191" } |
Body |
Default: { "hostip":"Host IP", "agentname":"Remote Agent name" } |
Type | Code | Content |
---|---|---|
JSON |
200 |
{ "Succeed": "Remote agent has been added successfully." } |
Type | Code | Content |
---|---|---|
JSON |
401 UNAUTHORIZED |
{ "Error": "The agent name you are trying to add already exists. Please use another agent name." } |
Figure 1 : Example to add a remote agent using Postman REST Client
Adding Remote Agents using cURL
To add a remote agent through the REST API using cURL, the command should be specified in the following format:
curl --location --request POST "http://<eG Manager IP:Port>/api/eg/orchestration/adaddremoteagent" -H "managerurl:http://<eG Manager IP:Port>" -H "user:<eG username or domain/eG username>" -H "pwd:Base64 encoded password" -H "Content-Type: application/json" --data-raw "{'hostip': 'Host IP', 'agentname': 'Remote Agent name'}"
Figure 2 shows an example of adding a remote agent using cURL.