Operations 10 min read

Step‑by‑Step Guide to Deploying Zabbix Distributed Monitoring on Linux

This article walks operations engineers through the concepts, components, and detailed installation steps for setting up a Zabbix distributed monitoring system on Linux, including server and agent configuration, web front‑end deployment, custom items, triggers, and email alerts.

MaGe Linux Operations
MaGe Linux Operations
MaGe Linux Operations
Step‑by‑Step Guide to Deploying Zabbix Distributed Monitoring on Linux

zabbix Distributed Monitoring

As an operations engineer you need a monitoring system to view server performance, application service status, and website traffic metrics, and to use the collected data to assess the health of a newly deployed site.

With a good monitoring software you can:

Browse the status of all servers through a friendly web interface.

View monitoring data conveniently on the web front‑end.

Trace back incidents to identify system problems and alerts.

What is Zabbix?

Zabbix is an enterprise‑grade open‑source solution that provides web‑based distributed system and network monitoring.

It can monitor various network parameters to ensure safe operation of servers and offers flexible notification mechanisms for rapid problem localisation and resolution.

Zabbix consists of two main parts: the Zabbix server and optional components such as the Zabbix agent. Data is collected via a client‑server model and displayed/configured through a browser‑server (B/S) model.

The server can gather remote host and network status via agents, SNMP, port checks, etc., and runs on Linux and other platforms.

The agent is installed on monitored hosts to collect hardware and OS information such as memory and CPU.

How It Works

The Zabbix agent periodically collects metric data from the monitored host and sends it to the Zabbix server. The server stores the data in the Zabbix database, and administrators can view graphical charts through the Zabbix web UI.

Zabbix Functional Components

Zabbix Server: configuration and management centre, also the alarm hub (requires setting item thresholds and alarm actions)
Zabbix database: persistent storage for configuration and metric data (supports MySQL, Oracle, GPDB, TSDB, etc.)
Zabbix web: UI for server configuration and data display (supports LAMP/LNMP)
Zabbix Agent: deployed on monitored hosts, collects metrics and sends them to the server (supports active and passive modes)
Zabbix Proxy: intermediate process placed between server and agents to offload load, aggregates data locally before forwarding
Java Gateway: collects metrics exposed by Java applications via JMX

Deploying the Zabbix Server

Rename the host to zbx-server .

Prepare the Nginx repository and install Nginx via yum (screenshots omitted for brevity).

Install the EPEL repository, Webtatic repository, and PHP packages (screenshots omitted).

Create necessary directories and test files (screenshots omitted).

Configure the MariaDB repository, install MariaDB, start the service, and initialise the database (screenshots omitted).

Create the Zabbix database with appropriate character set and grant privileges to a Zabbix user (screenshots omitted).

Extract the Zabbix tarball into /opt, import the provided SQL schema into the Zabbix database (screenshots omitted).

Install required dependencies and compile Zabbix from source (screenshots omitted).

Create a dedicated zabbix system user, then compile and install the server, frontend, and agent components (screenshots omitted).

Check the installed version, then edit /etc/zabbix/zabbix_server.conf to set the log path and database password (screenshots omitted).

Create a systemd service file for the Zabbix server, enable and start the service, and verify that port 10051 is listening (screenshots omitted).

Deploying the Web Front‑End

Access the frontend at http://zbx.kgc.com/ and log in with the default credentials (screenshots omitted).

Installing and Starting Zabbix Agent2

Install the Zabbix agent2 package, modify /etc/zabbix/zabbix_agent2.conf to point to the server IP and set the hostname, then enable and start the agent service (screenshots omitted).

After starting the agent, the initial “agent not installed” alarm disappears in the Zabbix UI (screenshots omitted).

Adding Zabbix Client Hosts

Synchronise time between client and server, configure /etc/hosts on both sides, and set up the Zabbix repository on the client (screenshots omitted).

Install the agent2 on the client, edit its configuration to specify the server IP and client hostname, then start the service and verify connectivity from the server (screenshots omitted).

Custom Monitoring Items

Create custom keys on the client, restart the agent, and verify the new items on the server (screenshots omitted).

Add the custom items to a template, test them, and then create a trigger that fires when more than four users are logged in (screenshots omitted).

Associate the template with the client host and add a graph to visualise the metric in real time (screenshots omitted).

When the number of logged‑in users exceeds four, the trigger fires and an alarm appears; closing a client reduces the graph value and clears the alarm (screenshots omitted).

Configuring Email Alerts

In the Zabbix UI, go to Administration → Media Types, create a new media type for email, and configure SMTP settings (screenshots omitted).

Test the email configuration to ensure messages are delivered to the specified mailbox (screenshots omitted). Set the severity level to “Average” or higher, create an action that sends an email when the trigger fires, and verify that alerts are received in the mailbox (screenshots omitted). This workflow enables rapid identification of problematic client machines and issues, allowing administrators to respond promptly.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

OperationsLinuxSystem AdministrationDistributed Monitoring
MaGe Linux Operations
Written by

MaGe Linux Operations

Founded in 2009, MaGe Education is a top Chinese high‑end IT training brand. Its graduates earn 12K+ RMB salaries, and the school has trained tens of thousands of students. It offers high‑pay courses in Linux cloud operations, Python full‑stack, automation, data analysis, AI, and Go high‑concurrency architecture. Thanks to quality courses and a solid reputation, it has talent partnerships with numerous internet firms.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.