Zabbix Monitoring
Enterprise-class monitoring solution for networks and applications.
Overview
Zabbix is an enterprise-grade monitoring platform developed since 2001 that provides comprehensive network, server, and application monitoring capabilities. The Zabbix server acts as the central processing engine, collecting and analyzing metrics from monitored hosts through multiple protocols including SNMP, IPMI, JMX, and custom agent communications. It processes trigger conditions, generates alerts, and maintains historical data for trend analysis and capacity planning. This stack combines the Zabbix server with PostgreSQL as the backend database and the Nginx-based web frontend, creating a complete monitoring infrastructure. PostgreSQL serves as the robust data repository for storing configuration data, historical metrics, events, and user settings, while the web interface provides visualization through dashboards, graphs, and administrative controls. The architecture supports distributed monitoring with proxy servers and can scale to monitor thousands of devices across multiple network segments. Organizations deploy this combination when they need enterprise-level monitoring with advanced features like predictive triggering, complex event correlation, and detailed performance analytics. The PostgreSQL backend ensures ACID compliance for critical monitoring data, while the Zabbix server's flexible template system and auto-discovery capabilities make it suitable for dynamic environments where infrastructure changes frequently.
Key Features
- Multi-protocol data collection supporting Zabbix agents, SNMP v1/v2c/v3, IPMI, JMX, and SSH checks
- Advanced trigger expressions with predictive functions and complex mathematical calculations
- Auto-discovery of network devices, services, and file systems with automated host provisioning
- Template inheritance system allowing hierarchical monitoring configuration management
- PostgreSQL backend with partitioned tables for efficient storage of time-series monitoring data
- Real-time and historical data visualization with customizable dashboards and graph widgets
- Flexible notification system supporting email, SMS, Slack, and custom webhook integrations
- Distributed monitoring architecture with proxy support for monitoring remote networks
Common Use Cases
- 1Enterprise network operations centers monitoring thousands of network devices and servers
- 2Cloud infrastructure monitoring with auto-discovery of dynamic AWS, Azure, or GCP resources
- 3Application performance monitoring for web services with custom JMX and database metrics
- 4IoT device monitoring using SNMP and custom protocols for industrial equipment
- 5Compliance monitoring for SOX, HIPAA, or PCI-DSS requiring detailed audit trails
- 6Hybrid cloud monitoring spanning on-premises data centers and public cloud instances
- 7MSP (Managed Service Provider) multi-tenant monitoring with separate client dashboards
Prerequisites
- Minimum 2GB RAM recommended (Zabbix server requires 1GB+ for moderate loads)
- Available ports 8080 (web interface), 10051 (Zabbix server), and 10050 (agent communications)
- Understanding of SNMP, network protocols, and basic database administration concepts
- PostgreSQL password configured in environment variables or .env file
- Network access to devices you plan to monitor via SNMP, SSH, or Zabbix agent protocols
- Time synchronization across monitored infrastructure for accurate event correlation
For development & testing. Review security settings, change default credentials, and test thoroughly before production use. See Terms
docker-compose.yml
docker-compose.yml
1services: 2 postgres: 3 image: postgres:16-alpine4 container_name: zabbix-postgres5 environment: 6 POSTGRES_USER: zabbix7 POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}8 POSTGRES_DB: zabbix9 volumes: 10 - postgres_data:/var/lib/postgresql/data11 networks: 12 - zabbix1314 zabbix-server: 15 image: zabbix/zabbix-server-pgsql:alpine-6.4-latest16 container_name: zabbix-server17 environment: 18 DB_SERVER_HOST: postgres19 POSTGRES_USER: zabbix20 POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}21 ports: 22 - "10051:10051"23 depends_on: 24 - postgres25 networks: 26 - zabbix2728 zabbix-web: 29 image: zabbix/zabbix-web-nginx-pgsql:alpine-6.4-latest30 container_name: zabbix-web31 environment: 32 DB_SERVER_HOST: postgres33 POSTGRES_USER: zabbix34 POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}35 ZBX_SERVER_HOST: zabbix-server36 ports: 37 - "8080:8080"38 depends_on: 39 - zabbix-server40 networks: 41 - zabbix4243volumes: 44 postgres_data: 4546networks: 47 zabbix: 48 driver: bridge.env Template
.env
1POSTGRES_PASSWORD=changemeUsage Notes
- 1Docs: https://www.zabbix.com/documentation/current/
- 2Web UI at http://localhost:8080 - default Admin/zabbix
- 3Install Zabbix agents on hosts to monitor them
- 4Import templates from Configuration > Templates for common services
- 5Agent port 10050, server port 10051 for active checks
- 6Supports SNMP, IPMI, JMX, and custom scripts for data collection
Individual Services(3 services)
Copy individual services to mix and match with your existing compose files.
postgres
postgres:
image: postgres:16-alpine
container_name: zabbix-postgres
environment:
POSTGRES_USER: zabbix
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: zabbix
volumes:
- postgres_data:/var/lib/postgresql/data
networks:
- zabbix
zabbix-server
zabbix-server:
image: zabbix/zabbix-server-pgsql:alpine-6.4-latest
container_name: zabbix-server
environment:
DB_SERVER_HOST: postgres
POSTGRES_USER: zabbix
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
ports:
- "10051:10051"
depends_on:
- postgres
networks:
- zabbix
zabbix-web
zabbix-web:
image: zabbix/zabbix-web-nginx-pgsql:alpine-6.4-latest
container_name: zabbix-web
environment:
DB_SERVER_HOST: postgres
POSTGRES_USER: zabbix
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
ZBX_SERVER_HOST: zabbix-server
ports:
- "8080:8080"
depends_on:
- zabbix-server
networks:
- zabbix
Quick Start
terminal
1# 1. Create the compose file2cat > docker-compose.yml << 'EOF'3services:4 postgres:5 image: postgres:16-alpine6 container_name: zabbix-postgres7 environment:8 POSTGRES_USER: zabbix9 POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}10 POSTGRES_DB: zabbix11 volumes:12 - postgres_data:/var/lib/postgresql/data13 networks:14 - zabbix1516 zabbix-server:17 image: zabbix/zabbix-server-pgsql:alpine-6.4-latest18 container_name: zabbix-server19 environment:20 DB_SERVER_HOST: postgres21 POSTGRES_USER: zabbix22 POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}23 ports:24 - "10051:10051"25 depends_on:26 - postgres27 networks:28 - zabbix2930 zabbix-web:31 image: zabbix/zabbix-web-nginx-pgsql:alpine-6.4-latest32 container_name: zabbix-web33 environment:34 DB_SERVER_HOST: postgres35 POSTGRES_USER: zabbix36 POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}37 ZBX_SERVER_HOST: zabbix-server38 ports:39 - "8080:8080"40 depends_on:41 - zabbix-server42 networks:43 - zabbix4445volumes:46 postgres_data:4748networks:49 zabbix:50 driver: bridge51EOF5253# 2. Create the .env file54cat > .env << 'EOF'55POSTGRES_PASSWORD=changeme56EOF5758# 3. Start the services59docker compose up -d6061# 4. View logs62docker compose logs -fOne-Liner
Run this command to download and set up the recipe in one step:
terminal
1curl -fsSL https://docker.recipes/api/recipes/zabbix/run | bashTroubleshooting
- Zabbix server cannot connect to PostgreSQL: Verify POSTGRES_PASSWORD environment variable matches across all services and PostgreSQL container is fully initialized
- Web interface shows database connection error: Check that zabbix-server container has completed database schema creation before zabbix-web starts, add restart: unless-stopped to handle race conditions
- Hosts show as unreachable in monitoring: Ensure Zabbix agent port 10050 is open on target hosts and zabbix-server container can access your network segment
- Performance issues with large datasets: Tune PostgreSQL shared_buffers and work_mem settings, consider implementing table partitioning for history and trends tables
- Memory usage growing continuously: Configure housekeeping settings in Administration > General > Housekeeping to automatically remove old historical data
- Alert notifications not working: Verify media types configuration and test SMTP/webhook connectivity from within the zabbix-server container network context
Community Notes
Loading...
Loading notes...
Download Recipe Kit
Get all files in a ready-to-deploy package
Includes docker-compose.yml, .env template, README, and license
Components
zabbix-serverzabbix-webpostgres
Tags
#zabbix#enterprise#network#monitoring
Category
Monitoring & ObservabilityAd Space
Shortcuts: C CopyF FavoriteD Download