Bobcares

Simple Steps to Configure Zabbix Agent on Ubuntu 24.04

by | Sep 4, 2024

Zabbix is an open-source tool for monitoring networks, servers, and applications. In this article, we’ll see how to configure Zabbix Agent on Ubuntu 24.04 in simple steps. At Bobcares, we assist our customers with several queries on a daily basis as part of our Server Management Services.

Overview
  1. How to Configure Zabbix Agent on Ubuntu 24.04?
  2. An Introduction on Zabbix Agent & Ubuntu 24.04
  3. Prerequisites
  4. Steps to Configure Zabbix Agent on Ubuntu 24.04
  5. Benefits of Zabbix Agent on Ubuntu 24.04
  6. Important Considerations
  7. Conclusion

How to Configure Zabbix Agent on Ubuntu 24.04?

An Introduction on Zabbix Agent & Ubuntu 24.04

Zabbix Agent: Zabbix is an open-source network monitoring and management solution that tracks the performance and availability of networks, servers, applications, and services. Zabbix’s broad feature set enables real-time monitoring, alerting, and metric graphing, providing insights into the health and performance of IT infrastructure. It supports a variety of data collection methods, including agent-based and agentless monitoring, SNMP, IPMI, and custom scripts, making it extremely flexible to a wide range of scenarios.

Configure Zabbix Agent on Ubuntu 24.04

Ubuntu 24.04: Ubuntu 24.04 LTS Noble Numbat provides a powerful, secure, and feature-rich experience for users of all levels, from novice Linux users to business administrators. With the most recent upgrades, improved tools for developers and data scientists, and long-term support via Ubuntu Pro, this edition is positioned as the best solution for both personal and business situations. Whether we’re upgrading or deploying for the first time, Ubuntu 24.04 LTS provides a smooth, stable, and powerful platform that meets the user requirements.

Prerequisites

1. An Ubuntu 24.04 ARM64 server.

2. Root access or a user with sudo rights.

3. To download the essential software, an internet connection.

Steps to Configure Zabbix Agent on Ubuntu 24.04

1. Update all packages:

bash

sudo apt update && sudo apt upgrade -y

2. Install Database Server MariaDB:

bash

sudo apt install mariadb-server -y
sudo systemctl start mariadb
sudo systemctl enable mariadb
sudo mysql_secure_installation

3. Create the database and user:

bash

sudo mysql -u root -p
CREATE DATABASE zabbix CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;
CREATE USER 'zabbix'@'localhost' IDENTIFIED BY 'strong_password';
GRANT ALL PRIVILEGES ON zabbix.* TO 'zabbix'@'localhost';
FLUSH PRIVILEGES;
EXIT;

4. Install Zabbix Repository:

bash

wget https://repo.zabbix.com/zabbix/7.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_7.0-1+ubuntu24.04_all.deb
sudo dpkg -i zabbix-release_7.0-1+ubuntu24.04_all.deb
sudo apt update

5. Install Zabbix Server, Frontend, and Agent:

bash

sudo apt install zabbix-server-mysql zabbix-sql-scripts zabbix-frontend-php zabbix-nginx-conf zabbix-agent

6. Configure Zabbix Database:

i. Import schema and update configuration:

bash

zcat /usr/share/zabbix-sql-scripts/mysql/server.sql.gz | mysql -uzabbix -p zabbix
sudo nano /etc/zabbix/zabbix_server.conf

ii. Update DBHost, DBName, DBUser, and DBPassword fields.

7. Configure Zabbix Frontend by editing Nginx and PHP configurations, then restart services:

bash

sudo nano /etc/zabbix/nginx.conf
sudo nano /etc/php/7.4/fpm/php.ini
sudo systemctl restart php7.4-fpm nginx

8. Start Zabbix Services:

bash

sudo systemctl start zabbix-server zabbix-agent
sudo systemctl enable zabbix-server zabbix-agent

9. Secure with SSL by installing Certbot and configure SSL:

bash

sudo apt install certbot python3-certbot-nginx -y
sudo certbot --nginx -d zabbix.example.com
sudo ufw allow http https
sudo ufw reload

10. Configure Zabbix Frontend by accessing Zabbix through the browser and complete the setup at http://zabbix.example.com/zabbix.

11. Log In to Zabbix: We can use default credentials such as;

Username: Admin
Password: zabbix

12. Adjust Firewall Rules. So, open port 10050 for Zabbix:

bash

sudo ufw allow 10050/tcp

13. In order to add New Host to Zabbix, login to the dashboard, add a new host, and start monitoring.

Benefits of Zabbix Agent on Ubuntu 24.04

The Zabbix Agent on Ubuntu 24.04 offers several benefits:

1. Real-time Monitoring: The system continuously tracks system performance, providing real-time insights into CPU, memory, disk usage, and network activity.

2. Customizable Monitoring: It also supports custom scripts and commands, allowing tailored monitoring to meet specific needs.

3. Low Resource Usage: There will be efficiency in resource consumption, ensuring minimal impact on system performance.

4. Automated Alerts: It also sends instant notifications for any issues or threshold breaches, enabling prompt action.

5. Integration: Seamlessly integrates with the Zabbix Server, enabling centralized monitoring across multiple systems.

6. Enhanced Security: The setup supports encrypted communication, ensuring secure data transmission between the agent and server.

7. Cross-Platform Compatibility: It works well with various operating systems, allowing unified monitoring in diverse environments.

8. Long-term Support: There will be benefits from Ubuntu 24.04’s LTS (Long-Term Support) release, ensuring stability and security updates for several years.

Important Considerations

1. Installation: Ensure we install the Zabbix agent from the official repositories.

2. Configuration: Set up the configuration file to include the IP address of the Zabbix server. This will help the agent communicate with the server properly.

3. Hostname: Make sure the hostname configured in the agent matches what’s set in the Zabbix server. This helps with accurate identification.

4. Firewall Rules: Check that the necessary network ports for the Zabbix agent and server are open to allow communication.

5. Service Management: Start the Zabbix agent service and set it to start automatically with the system.

6. Security Policies: Ensure that security policies, like SELinux or AppArmor, do not block the agent’s operations.

7. Testing: Monitor log files to confirm the agent is functioning and communicating correctly.

8. Encryption: Consider using encryption for secure data transmission between the Zabbix server and agent.

9. Updates: Keep the Zabbix agent updated to incorporate the latest features and security improvements.

[Searching solution for a different question? We’re happy to help.]

Conclusion

To summarize, configuring the Zabbix Agent on Ubuntu 24.04 offers a robust and efficient solution for real-time, configurable system monitoring. It ensures that the infrastructure remains resilient and responsive by using minimal resources, sending automated alarms, and allowing for secure communication. Its easy connection with Zabbix Server and long-term support from Ubuntu 24.04 make it an excellent choice for ensuring system health and performance in a variety of situations.

0 Comments

Submit a Comment

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

Never again lose customers to poor
server speed! Let us help you.