install zabbix agent on oracle vps

1. Update System Packages and Install zabbix agent

https://www.zabbix.com/download?zabbix=6.4&os_distribution=ubuntu_arm64&os_version=20.04&components=agent&db=&ws=

sudo apt update
sudo apt install zabbix-agent

2. Configure the Zabbix Agent: After the installation is complete, you need to configure the Zabbix agent. The configuration file is located at /etc/zabbix/zabbix_agentd.conf. Open this file in a text editor with root privileges:

sudo nano /etc/zabbix/zabbix_agentd.conf

3. Set the Server and Hostname: In the configuration file, locate the Server and Hostname parameters. Uncomment these lines (remove the # symbol at the beginning) and set the IP address or hostname of the Zabbix server:

Server=<zabbix_server_ip>
Hostname=<hostname_of_agent>

4. Enable the Zabbix Agent Service And Restart: By default, the Zabbix agent service is disabled. Use the following command to enable and start the service:

sudo systemctl enable --now zabbix-agent
sudo systemctl restart zabbix-agent

5. Update firewall settings: The Ubuntu firewall is disabled by default. However, you still need to update your iptables configuration to allow HTTP traffic. Update iptables with the following commands.

sudo iptables -I INPUT 6 -m state --state NEW -p tcp --dport 10050 -j ACCEPT
sudo netfilter-persistent save

6. test to connect the port

telnet ip 10050

Other usefull commands:

sudo systemctl status zabbix-agent
sudo iptables -L
sudo ufw status
sudo ufw allow 10050
sudo firewall-cmd --zone=public --add-port=80/tcp --permanent
sudo firewall-cmd --list-all
sudo firewall-cmd --zone=public --list-all
systemctl list-units --type=service --state=running
systemctl list-units --type=service --all
systemctl list-units --type=service --all --full
systemctl status SERVICE_NAME
ps aux
netstat -tuln | grep PORT_NUMBER

Reference:

https://docs.oracle.com/en-us/iaas/developer-tutorials/tutorials/apache-on-ubuntu/01oci-ubuntu-apache-summary.htm

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *