zabbix
monitoring solution
What is Zabbix ?
Zabbix is an open-source software tool to monitor IT infrastructure such as networks, servers, virtual machines, and cloud services. Zabbix collects and displays basic metrics.
How to Deploy
Create folder zabbix
1
mkdir zabbix && cd zabbix
Create docker-compose.yaml
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
services:
postgres:
image: postgres:16-alpine
container_name: zabbix-postgres
restart: unless-stopped
environment:
POSTGRES_USER: zabbix
POSTGRES_PASSWORD: zabbix
POSTGRES_DB: zabbix
volumes:
- zabbix-db:/var/lib/postgresql/data
networks:
- zabbix-net
zabbix-server:
image: zabbix/zabbix-server-pgsql:alpine-7.2
container_name: zabbix-server
restart: unless-stopped
environment:
DB_SERVER_HOST: postgres
POSTGRES_USER: zabbix
POSTGRES_PASSWORD: zabbix
POSTGRES_DB: zabbix
depends_on:
- postgres
networks:
- zabbix-net
ports:
- "10051:10051"
zabbix-web:
image: zabbix/zabbix-web-nginx-pgsql:alpine-7.2
container_name: zabbix-web
restart: unless-stopped
environment:
DB_SERVER_HOST: postgres
POSTGRES_USER: zabbix
POSTGRES_PASSWORD: zabbix
POSTGRES_DB: zabbix
ZBX_SERVER_HOST: zabbix-server
PHP_TZ: "UTC"
depends_on:
- postgres
- zabbix-server
networks:
- zabbix-net
ports:
- "8080:8080"
volumes:
zabbix-db:
networks:
zabbix-net:
Start Zabbix Containers
1
docker-compose up -d
Access the Web UI
Open http://<YOUR_SERVER_IP>:8080
in a browser.
Default Login Credentials:
Username: Admin
Password: zabbix
Set Up Reverse Proxy (Optional)
If you want to use Nginx Proxy Manager:
Create a proxy host for zabbix.yourdomain.com Forward it to zabbix-web:8080
Define Your Monitoring Strategy
Decide what you want to monitor:
- Servers (Linux, Windows, VM, Cloud)
- Network devices (Routers, Switches, Firewalls, Access Points)
- Applications (Databases, Web Apps, APIs)
- Logs & Metrics (CPU, Memory, Bandwidth, Security Events)
Monitor Servers with Zabbix Agent
Install Zabbix Agent 2 on all your servers (Linux/Windows) for detailed monitoring.
Linux Installation
On Ubuntu/Debian, run:
1
2
3
4
wget https://repo.zabbix.com/zabbix/6.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_6.0-1+ubuntu22.04_all.deb
sudo dpkg -i zabbix-release_6.0-1+ubuntu22.04_all.deb
sudo apt update
sudo apt install zabbix-agent2
Edit /etc/zabbix/zabbix_agent2.conf
:
1
2
3
Server=<ZABBIX_SERVER_IP>
ServerActive=<ZABBIX_SERVER_IP>
Hostname=<YOUR_HOSTNAME>
Start the agent:
1
2
sudo systemctl restart zabbix-agent2
sudo systemctl enable zabbix-agent2
Windows Installation
Download the agent from Zabbix official site.
Edit C:\Program Files\Zabbix Agent 2\zabbix_agent2.conf
to set:
1
2
3
Server=<ZABBIX_SERVER_IP>
ServerActive=<ZABBIX_SERVER_IP>
Hostname=<YOUR_HOSTNAME>
Start the agent service.
Exposed Ports for Zabbix
Here are the essential ports and their functions:
Service | Port | Usage |
---|---|---|
Zabbix Server | 10051 | Zabbix Agents send data to the server |
Zabbix Agent Active | 10050 | Server queries the agent |
Zabbix Web UI | 8080 | Web interface |
Final Steps
🚀 Start monitoring your network & servers
🔔 Set up alerts & dashboards