Problem scenario
You have set up Zabbix server (i.e., using these directions). How do you configure another RedHat Linux server in AWS to be configured with the client so the Zabbix will monitor it?
Solution
Section 1
1. Make sure your AWS Security group (that governs this AWS instance that will be a client) 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.
Section 2
2. One the AWS instance (Linux server) that will be the Zabbix client, run these three commands:
sudo rpm --import http://repo.zabbix.com/RPM-GPG-KEY-ZABBIX
sudo rpm -Uv http://repo.zabbix.com/zabbix/2.4/rhel/7/x86_64/zabbix-release-2.4-1.el7.noarch.rpm
sudo yum install zabbix-agent -y
Section 3
3. 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.
Section 4
4. Return to the AWS instance (Linux server) that will receive the agent.
i. Run this command: sudo vi /etc/zabbix/zabbix_agentd.conf
ii. Edit line 84 and change the "127.0.0.1" to the internal IP address of the Zabbix server. It will look like this:
Server=10.1.1.1
iii. Edit line 126 so "ServerActive=" is assigned the internal IP address of the Zabbix server. It will look like this:
ServerActive=10.1.1.1
iv. Edit line 135 so that "Hostname=" is assigned the internal FQDN of the Zabbix server. It will look like this:
Hostname=ip-172-31-29-241.us-east-2.compute.internal
v. Save the changes.
vi. Run these two commands:
sudo systemctl start zabbix-agent
sudo systemctl enable zabbix-agent
vii. Find the internal IP address of the Zabbix client 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.
Section 5
5. i. Go to the web UI of the Zabbix server. Go to Configuration -> Hosts -> Create Host.
ii. 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.
iii. In the "IP Address" of the "Agent interfaces" section, enter the IP address found in Section 4 above.
iv. Click "Add" in the lower left-center section.
v. Click the hostname that is hyperlinked.
vi. Click "Templates" (but not the highest of the "Templates" tab) that is below other tabs. Here is a picture of where to click.
The resulting view, after you click on the correct "Templates" tab, should look like this:
vii. 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.
viii. Click "Add."
ix. Then click "Update."
x. You are done. Be prepared to see this alert "Lack of free swap space on ..." These directions are just designed to get you started.