Operations 20 min read

Master Zabbix: From Installation to Advanced Custom Monitoring

This guide explains why monitoring is essential, describes the concept of availability "X nines," walks through Zabbix installation, web interface setup, host and template configuration, custom monitoring, alerting with OneAlert, visualization, distributed monitoring, SNMP integration, and provides practical command examples for managing large server fleets.

Efficient Ops
Efficient Ops
Efficient Ops
Master Zabbix: From Installation to Advanced Custom Monitoring

Monitoring Overview

Why Monitor

To receive early alerts when servers encounter issues, to identify root causes, and to ensure website/server availability.

Website Availability

High Availability (HA) is measured by the number of nines (X) representing the percentage of uptime over a year. For example, 1 nine (90%) equals 36.5 days of downtime per year, while 5 nines (99.999%) equals about 5.26 minutes of downtime.

1 nine: 90% uptime – 36.5 days downtime per year 2 nines: 99% uptime – 3.65 days downtime per year 3 nines: 99.9% uptime – 8.76 hours downtime per year 4 nines: 99.99% uptime – 52.6 minutes downtime per year 5 nines: 99.999% uptime – 5.26 minutes downtime per year 6 nines: 99.9999% uptime – 31 seconds downtime per year

What to Monitor

Anything that can be monitored via commands, including remote management cards (Dell iDRAC, HP iLO, IBM IMM), hardware, and services.

Installing Zabbix

Environment Check

Installation Methods

Compile installation (many services, complex environment)

Yum installation (clean environment, requires a yum repository)

Server Quick Install Script

Client Quick Deploy Script

Connectivity Test

Install the Zabbix get tool on the server:

yum install zabbix-get

Web Interface Operations

Zabbix Web Installation

Access the setup page via

http://10.0.0.61/zabbix/setup.php

. Follow the wizard, select MySQL, and provide the password.

Confirm host and port settings, customize the name, and finish the installation.

Adding Monitoring Items

Navigate to Configuration → Hosts , edit the host name to match the system hostname, set a visible name, and enable the host.

Create a new host via Configuration → Hosts → Create host and enable it.

Attach the Template OS Linux to the host to automatically monitor CPU, memory, disk, and network interfaces.

Viewing Monitoring Data

Go to Monitoring → Latest data and filter by IP or host name to see all items.

Viewing Graphs

Navigate to Monitoring → Graphs , select the host, and view the desired graphs.

Custom Monitoring and Alerts

Custom Monitoring

Zabbix provides the Template OS Linux with CPU, memory, disk, and NIC monitoring. Example requirement: trigger an alarm when more than three users are logged in.

Implementing Custom Monitoring

Create a template, add an application set, define a monitoring item (e.g.,

login-user

), and create a trigger with a custom expression and severity.

Alerting with OneAlert

Configure OneAlert to send notifications via SMS, WeChat, QQ, or phone calls. Add an application named "zabbix" and enable WeChat alerts.

OneAlert Agent Installation and Removal

Install the OneAlert agent on the server, then delete the script, user, user group, and action when removing.

Visualization

Aggregated Graphs

In Monitoring → Graphs , create an aggregated graph, customize its name, and add desired sub‑graphs.

Slideshows

Create a slideshow under Monitoring → Composite graphs → Slides to automatically play selected graphs.

Template Sharing

Export hosts or templates from the host page and import them on another Zabbix server.

Full‑Network Monitoring

Planning

Monitor CPU, memory, disk, and NIC for 100 servers. Methods include cloning, auto‑registration, auto‑discovery, and using the Zabbix API (curl, Python).

Implementation

Install client scripts, configure auto‑discovery rules, create discovery actions, and add hosts automatically.

Distributed Monitoring and SNMP

Distributed Monitoring

Deploy Zabbix proxies to offload the server and monitor remote data centers. Configure the proxy with a MySQL database, adjust

Server

and

Hostname

in

zabbix_proxy.conf

, and restart the service.

rpm -ivh http://repo.zabbix.com/zabbix/3.0/rhel/7/x86_64/zabbix-release-3.0-1.el7.noarch.rpm
yum install zabbix-proxy-mysql -y

SNMP Monitoring

Install SNMP utilities to monitor devices without agents.

yum -y install net-snmp net-snmp-utils

Configure

/etc/snmp/snmpd.conf

to include the system view and start the service.

sed -i '57a view systemview   included  .1' /etc/snmp/snmpd.conf
systemctl start snmpd.service

Test with

snmpwalk -v 2c -c public 127.0.0.1 sysName

.

snmpwalk -v 2c -c public 127.0.0.1 sysName.0 = STRING: m01
MonitoringAutomationoperationsLinuxZabbix
Efficient Ops
Written by

Efficient Ops

This public account is maintained by Xiaotianguo and friends, regularly publishing widely-read original technical articles. We focus on operations transformation and accompany you throughout your operations career, growing together happily.

0 followers
Reader feedback

How this landed with the community

login 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.