Pre Installed
1 2 3 4 5 |
yum update yum install epel-release [root@monitoring-test ~]# firewall-cmd --add-service=http --permanent success [root@monitoring-test ~]# firewall-cmd --reload |
Alternatif : Kalau server hanya di lokal, disable firewallnya saja systemctl stop firewalld
Install Zabbix
1 2 3 4 5 6 |
rpm -Uvh https://repo.zabbix.com/zabbix/5.0/rhel/8/x86_64/zabbix-release-5.0-1.el8.noarch.rpm dnf clean all dnf install zabbix-server-mysql zabbix-web-mysql zabbix-apache-conf zabbix-agent systemctl start zabbix-server zabbix-agent systemctl enable zabbix-server zabbix-agent |
MySQL
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 |
yum install mysql-server [root@monitoring-test ~]# systemctl enable mysqld Created symlink /etc/systemd/system/multi-user.target.wants/mysqld.service → /usr/lib/systemd/system/mysqld.service. [root@monitoring-test ~]# systemctl start mysqld [root@monitoring-test ~]# mysql_secure_installation Securing the MySQL server deployment. Connecting to MySQL using a blank password. VALIDATE PASSWORD COMPONENT can be used to test passwords and improve security. It checks the strength of password and allows the users to set only those passwords which are secure enough. Would you like to setup VALIDATE PASSWORD component? Press y|Y for Yes, any other key for No: y There are three levels of password validation policy: LOW Length >= 8 MEDIUM Length >= 8, numeric, mixed case, and special characters STRONG Length >= 8, numeric, mixed case, special characters and dictionary file Please enter 0 = LOW, 1 = MEDIUM and 2 = STRONG: 1 Please set the password for root here. New password: Re-enter new password: Estimated strength of the password: 100 Do you wish to continue with the password provided?(Press y|Y for Yes, any other key for No) : y By default, a MySQL installation has an anonymous user, allowing anyone to log into MySQL without having to have a user account created for them. This is intended only for testing, and to make the installation go a bit smoother. You should remove them before moving into a production environment. Remove anonymous users? (Press y|Y for Yes, any other key for No) : y Success. Normally, root should only be allowed to connect from 'localhost'. This ensures that someone cannot guess at the root password from the network. Disallow root login remotely? (Press y|Y for Yes, any other key for No) : y Success. By default, MySQL comes with a database named 'test' that anyone can access. This is also intended only for testing, and should be removed before moving into a production environment. Remove test database and access to it? (Press y|Y for Yes, any other key for No) : y - Dropping test database... Success. - Removing privileges on test database... Success. Reloading the privilege tables will ensure that all changes made so far will take effect immediately. Reload privilege tables now? (Press y|Y for Yes, any other key for No) : y Success. All done! [root@monitoring-test ~]# |
Buat Database dan User Zabbix
1 2 3 4 5 6 7 8 9 |
mysql> create database zabbix character set utf8 collate utf8_bin; Query OK, 1 row affected, 2 warnings (0.00 sec) mysql> create user 'zabbix'@'%' identified by 'Passw0rd!'; Query OK, 0 rows affected (0.00 sec) mysql> grant all privileges on zabbix.* to 'zabbix'@'%'; # zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -p zabbix |
Config DBPassword di file zabbix
1 2 3 4 5 6 7 |
nano /etc/zabbix/zabbix_server.conf DBPassword=Passw0rd! nano /etc/php-fpm.d/zabbix.conf php_value[date.timezone] = Asia/Makassar systemctl restart php-fpm.service |
Install Frontend (https://www.zabbix.com/documentation/current/manual/installation/install#installing_frontend)
Install Agent Di Windows
Panduan : https://tecadmin.net/add-host-zabbix-server-monitor/
1 2 3 4 5 6 7 |
C:\Users\Administrator>c:\zabbix\zabbix_agentd.exe -c c:\zabbix\zabbix_agentd.co nf -i zabbix_agentd.exe [6024]: service [Zabbix Agent] installed successfully zabbix_agentd.exe [6024]: event source [Zabbix Agent] installed successfully C:\Users\Administrator>hostname DEPO-SERVER |
Pastikan :
– firewall tidak nge-block,
– settingan di agent.conf Server, Server Active, Hostname
– Jangan lupa restart juga di agent kalo sudah ganti konfig
So, Zabbix server or proxy successfully opens a TCP connection to agent to do a passive check (to get an item value).
https://www.zabbix.com/forum/zabbix-troubleshooting-and-problems/45455-get-value-from-agent-failed-zbx_tcp_read-failed-104-connection-reset-by-peer
One possible reason – Zabbix agent closes connection because it comes from a host or IP address, not matching “Server=” parameter in zabbix_agentd.conf file.
Another reason – if encryption is used – could be problems with TLS.
Yet another reason – some network device (firewall?) between server and agent is disrupting communication.
Referensi lainnya
- https://www.interserver.net/tips/kb/installing-zabbix-agent-on-windows/
- https://www.zabbix.com/documentation/current/manual/appendix/install/windows_agent#installing_agent_as_windows_service
Was this helpful?
1 / 0