In the previous post, I showed you how to install Zabbix Server on Centos 7 operating system. In this article, I will guide you to set up Centos server monitoring, before doing this I will learn through some basic concepts. copy:
- Host: Is a computer, server, vps running different operating systems or an entity in the network.
- Templates: A layout or a component that is pre-made so that it doesn’t have to be repeated when it comes to the right situation
- Items: This is a place where keys such as key memory, key cpu, key hdd … Items are included in a template.
- Triggers: Is a condition that satisfies the condition of the Trigger that the programmer sets, then a certain action will be performed next.
- Graps: Is a visual monitoring diagram for administrators to see information more easily.
1. Install zabbix agent
To monitor the hosts we need to install zabbix agent on the hosts Step 1: Download Zabbix-agent
1 2 | rpm -Uvh https://repo.zabbix.com/zabbix/4.4/rhel/7/x86_64/zabbix-agent-4.4.0-1.el7.x86_64.rpm |
Step 2: Install Zabbix-agent
1 2 | yum install zabbix-agent -y |
Step 3: Configure Zabbix-agent Edit the configuration file /etc/zabbix/zabbix_agentd.conf with the following parameters
1 2 3 4 | Server=<IP_ZABBIX_SERVER> ServerActive=<IP_ZABBIX_SERVER> Hostname=<ZABBIX_SERVER_HOSTNAME> |
Step 4: Configure firewalld
1 2 3 | firewall-cmd --zone=public --add-port=10050/tcp --permanent firewall-cmd --reload |
Step 5: Restart Zabbix-agent
1 2 3 | systemctl enable zabbix-agent systemctl restart zabbix-agent |
Step 6: Check the installation of zabbix-agent Execute on Zabbix Server, use zabbix-get to test
1 2 | zabbix_get -s <ZABBIX_AGENT_IP> -k agent.version |
If the output shows the version of zabbix-agent then the connection from zabbix-server to zabbix-agent was successful.
2. Add Centos 7 host on Zabbix-server interface
Step 1: Log in to the Zabbix-server dashboard
Step 2: Select Configuration >> Select Host >> Select Create Host
Now you fill in the necessary information as shown below
Step 3: Select Templates to monitor the service On Zabbix, many different Templates are now supported, but in this article, I only use some commonly used templates for monitoring a Linux server The templates use Use:
- HTTPS Services
- ICMP Ping
- Linux by Zabbix agent
- Mysql by Zabbix agent
Click Add to complete the add host configuration
So we have completed the add monitoring of a Linux server.