Bash script for deploying Zabbix 6.4 on Ubuntu 22.04 with optimized settings for datacenter environments.
This repository contains a Bash script for automating the installation and configuration of Zabbix 6.4 on an Ubuntu 22.04 server using the LAMP stack.
- 90 VMs (Linux and Windows).
- 4 hyper-converged cluster virtualizers.
- 2 layer switches.
- 2 firewalls in HA.
- 1 enterprise NAS for secure VM backups.
- 150GB SSD (SSD virtual hard disk).
- 8GB RAM.
- 4 vCPUs.
In the configuration file /etc/zabbix/zabbix_server.conf
, the ValueCacheSize
value was adjusted to 64MB.
Benefits:
- Provides better stability for environments with a high number of monitored metrics (90+ VMs).
- Enhances performance for caching metrics.
In the configuration file /etc/mysql/mysql.conf.d/mysqld.cnf
, the following changes were made:
- Uncommented and configured:
log_bin = /var/log/mysql/mysql-bin.log binlog_expire_logs_seconds = 432000 max_binlog_size = 100M
Benefits:
- Reduces disk space used by binary logs while maintaining an adequate recovery window
- Efficient File Management: Smaller, more manageable log files improve read/write speed.
- binlog_expire_logs_seconds = 432000 (from 2592000, equivalent to 30 days, to 432000, equivalent to 5 days).
- This script is intended for fresh Ubuntu 22.04 installations.
- Update the system
sudo su apt update && apgrade -y
- Clone the repository
git clone https://github.com/eugeniogiusti/zabbix_datacenter_monitoring.git cd zabbix_datacenter_monitoring
- Make the script executable:
chmod +x install_zabbix.sh
- Run the script as root:
sudo ./install_zabbix.sh
- Access the Zabbix Frontend / Find the server’s IP address:
http://yourlocalip/zabbix
- Complete the initial configuration wizard: Enter the database details configured by the script:
Database Name: zabbix User: zabbix Password: Password2025!
Follow the steps to finish the setup. Log in to the Zabbix dashboard with the default credentials:
Username: Admin
Password: zabbix