You are running Ubuntu Linux in AWS. You want to monitor it with your Zabbix server. (To set up a Zabbix server in AWS, see this posting.) How do you install the Zabbix client on an Ubuntu server?
Make sure your AWS Security group allows for inbound connections from the internal IP address of the Zabbix server on any TCP port. Otherwise the client will not be able to be monitored.
Run this command: sudo apt-get -y install zabbix-agent
Go to the back end of the Zabbix server. Find the internal IP address of the Zabbix server's back end, run this command and find a different IP address from 127.0.0.1: ip addr show | grep inet
Then run "hostname -f". Keep this IP address and FQDN for the next steps performed on the other server.
Return to the Linux server that will receive the agent.
sudo vi /etc/zabbix/zabbix_agentd.conf
Edit line 85 and change the "127.0.0.1" to the internal IP address of the Zabbix server. It will look like this:
Edit line 126 so "ServerActive=" is assigned the internal IP address of the Zabbix server. It will look like this:
Edit line 137 so that "Hostname=" is assigned the internal FQDN of the Zabbix server. It will look like this:
Save the changes of the file. From the command prompt run these commands:
sudo systemctl start zabbix-agent
sudo systemctl enable zabbix-agent
Go to the web UI of the Zabbix server. Go to Configuration -> Hosts -> Create Host.
In hostname, enter the internal FQDN of the client server. In the Groups section, highlight "Linux servers" and "Virtual Machines." Click the "left arrow" button to move these two groups to the "In Groups" section. In the "IP Address" of the "Agent interfaces" section, enter the IP address.
Click "Add" in the lower left-center section.
Click the hostname that is hyperlinked.
Click the "Templates" tab (but not the highest of the "Templates" tab) that is below other tabs. Here is a picture of where to click:
The resulting screen should look like this:
In the "Link new templates" field, type "Template OS Linux." Click the correct suggestion as it appears. Then type in "Template App SSH Service." Click the correct suggestion as it appears. Click "Add." Then click "Update."
You are done. Be prepared to see this alert "Lack of free swap space on ..." These directions are just designed to get you started.