Agent Forward
The agent_forward program allows for monitoring of COSMOS Agents on a different network. All agents are forwarded bi-directionally between two computers. agent_forward needs to be run from two computers on two separate networks.
Example: If you have an agent running on Computer 1 (C1) and you want to monitor the agent from Computer 2 (C2)
You will need the IP addresses of both computers. You can get it by entering this command in the terminal: /sbin/ifconfig
The “inet” field displays the computer’s current IP address.
agent_forward usage:
$ agent_forward 127.0.0.1
- Run agent_forward on C1, replacing ‘127.0.0.1’ in the above command with the IP address of C2
- Run agent_forward on C2, replacing ‘127.0.0.1’ in the above command with the IP address of C1
- Verify: on C2 execute agent list, you should be able to see the same agents as C1
You can also use a free Amazon Web Services instance to test this capability at aws.amazon.com.
- Go to aws.amazon.com and create an account
- Go to "Services" and select EC2
- On the left panel select "Instances"
- Click the blue "Launch Instance" button
- Check the "Free tier only" checkbox on the left panel
- Scroll down and select an instance with OS of your choice (Ubuntu 16.04 LTS works)
- Keep default settings for testing, the only one that is important is security groups:
- Change the "Source" from "Custom" to "My IP"
- Click "Launch" and create a new private key. Store it somewhere you can remember.
- Once the instance is launched, you can ssh into the server using:
ssh -i path/to/your/privatekey.pem ubuntu@<AWS IP Address>
Afterwards, install COSMOS as usual on the remote server. The public IP is available on the EC2 dashboard. Continue with the tutorial using the previous steps.