Zabbix Enterprise Monitoring
Complete Zabbix stack with server, web, agent, and PostgreSQL backend.
Overview
Zabbix Server is an open-source enterprise-class network monitoring solution that has been providing comprehensive infrastructure monitoring capabilities for over two decades. Originally developed by Alexei Vladishev in 2001, Zabbix excels at monitoring network services, servers, virtual machines, cloud resources, applications, and IoT devices through multiple collection methods including SNMP, IPMI, JMX, and custom agents. The platform stands out for its ability to handle millions of metrics while providing real-time visualization, flexible alerting, and automated discovery of network resources. This complete monitoring stack combines Zabbix Server with PostgreSQL as the backend database, delivering enterprise-grade performance and reliability. PostgreSQL's advanced indexing capabilities and ACID compliance make it ideal for storing the massive amounts of time-series data that Zabbix generates, while its JSON support enables flexible metadata storage for monitored items. The integrated NGINX web server provides high-performance delivery of the Zabbix web interface, handling concurrent user sessions efficiently while serving dashboards, graphs, and configuration screens. Organizations requiring comprehensive infrastructure visibility will find this stack particularly valuable for its scalability and depth of monitoring capabilities. Unlike simple uptime monitors or basic metrics collectors, this Zabbix deployment can handle complex monitoring scenarios including network topology mapping, predictive analytics through trend functions, and sophisticated alerting workflows with escalation chains and maintenance windows.
Key Features
- Real-time monitoring with sub-second item collection intervals and immediate problem detection
- Advanced trigger expressions supporting statistical functions, trend analysis, and predictive forecasting
- Auto-discovery rules for automatic detection of network devices, file systems, and database instances
- Template-based monitoring with inheritance and macro support for scalable configuration management
- Native SNMP v1/v2c/v3 support for monitoring network equipment from all major vendors
- Low-level discovery (LLD) for automatic creation of items, triggers, and graphs for dynamic resources
- Distributed monitoring with proxy servers for remote location monitoring and reduced network overhead
- Flexible alerting with media types including email, SMS, webhooks, and custom script execution
Common Use Cases
- 1Enterprise data center monitoring with thousands of servers, network devices, and applications
- 2Multi-tenant service provider infrastructure monitoring with customer-specific dashboards and SLAs
- 3DevOps teams monitoring containerized applications and microservices architectures
- 4Network operations centers (NOCs) requiring 24/7 infrastructure visibility and incident response
- 5Compliance monitoring for industries requiring audit trails and availability reporting
- 6IoT device monitoring in manufacturing, smart city, or industrial automation environments
- 7Cloud hybrid monitoring combining on-premises infrastructure with AWS, Azure, or GCP resources
Prerequisites
- Minimum 4GB RAM recommended for small environments (up to 1000 monitored items)
- Docker Engine 20.10+ and Docker Compose v2 for container orchestration support
- Available ports 8080, 8443, and 10051 for web interface and server communication
- Basic understanding of SNMP, network protocols, and monitoring concepts
- PostgreSQL administration knowledge for database maintenance and performance tuning
- Familiarity with Zabbix template system and trigger expression syntax
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:15-alpine4 environment: 5 - POSTGRES_USER=zabbix6 - POSTGRES_PASSWORD=${POSTGRES_PASSWORD}7 - POSTGRES_DB=zabbix8 volumes: 9 - postgres_data:/var/lib/postgresql/data10 networks: 11 - zabbix_net1213 zabbix-server: 14 image: zabbix/zabbix-server-pgsql:latest15 environment: 16 - DB_SERVER_HOST=postgres17 - POSTGRES_USER=zabbix18 - POSTGRES_PASSWORD=${POSTGRES_PASSWORD}19 - POSTGRES_DB=zabbix20 ports: 21 - "10051:10051"22 volumes: 23 - zabbix_data:/var/lib/zabbix24 depends_on: 25 - postgres26 networks: 27 - zabbix_net2829 zabbix-web: 30 image: zabbix/zabbix-web-nginx-pgsql:latest31 environment: 32 - ZBX_SERVER_HOST=zabbix-server33 - DB_SERVER_HOST=postgres34 - POSTGRES_USER=zabbix35 - POSTGRES_PASSWORD=${POSTGRES_PASSWORD}36 - POSTGRES_DB=zabbix37 - PHP_TZ=UTC38 ports: 39 - "8080:8080"40 - "8443:8443"41 depends_on: 42 - zabbix-server43 networks: 44 - zabbix_net4546 zabbix-agent: 47 image: zabbix/zabbix-agent:latest48 environment: 49 - ZBX_SERVER_HOST=zabbix-server50 - ZBX_HOSTNAME=zabbix-agent51 privileged: true52 pid: host53 depends_on: 54 - zabbix-server55 networks: 56 - zabbix_net5758 zabbix-agent2: 59 image: zabbix/zabbix-agent2:latest60 environment: 61 - ZBX_SERVER_HOST=zabbix-server62 - ZBX_HOSTNAME=zabbix-agent263 volumes: 64 - /var/run/docker.sock:/var/run/docker.sock:ro65 depends_on: 66 - zabbix-server67 networks: 68 - zabbix_net6970volumes: 71 postgres_data: 72 zabbix_data: 7374networks: 75 zabbix_net: .env Template
.env
1# Zabbix Monitoring2POSTGRES_PASSWORD=secure_postgres_password34# Zabbix Web at http://localhost:80805# Default: Admin/zabbixUsage Notes
- 1Web UI at http://localhost:8080
- 2Default credentials: Admin/zabbix
- 3Agent2 supports Docker monitoring
- 4SNMP and IPMI monitoring
- 5Template-based configuration
Individual Services(5 services)
Copy individual services to mix and match with your existing compose files.
postgres
postgres:
image: postgres:15-alpine
environment:
- POSTGRES_USER=zabbix
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=zabbix
volumes:
- postgres_data:/var/lib/postgresql/data
networks:
- zabbix_net
zabbix-server
zabbix-server:
image: zabbix/zabbix-server-pgsql:latest
environment:
- DB_SERVER_HOST=postgres
- POSTGRES_USER=zabbix
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=zabbix
ports:
- "10051:10051"
volumes:
- zabbix_data:/var/lib/zabbix
depends_on:
- postgres
networks:
- zabbix_net
zabbix-web
zabbix-web:
image: zabbix/zabbix-web-nginx-pgsql:latest
environment:
- ZBX_SERVER_HOST=zabbix-server
- DB_SERVER_HOST=postgres
- POSTGRES_USER=zabbix
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=zabbix
- PHP_TZ=UTC
ports:
- "8080:8080"
- "8443:8443"
depends_on:
- zabbix-server
networks:
- zabbix_net
zabbix-agent
zabbix-agent:
image: zabbix/zabbix-agent:latest
environment:
- ZBX_SERVER_HOST=zabbix-server
- ZBX_HOSTNAME=zabbix-agent
privileged: true
pid: host
depends_on:
- zabbix-server
networks:
- zabbix_net
zabbix-agent2
zabbix-agent2:
image: zabbix/zabbix-agent2:latest
environment:
- ZBX_SERVER_HOST=zabbix-server
- ZBX_HOSTNAME=zabbix-agent2
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
depends_on:
- zabbix-server
networks:
- zabbix_net
Quick Start
terminal
1# 1. Create the compose file2cat > docker-compose.yml << 'EOF'3services:4 postgres:5 image: postgres:15-alpine6 environment:7 - POSTGRES_USER=zabbix8 - POSTGRES_PASSWORD=${POSTGRES_PASSWORD}9 - POSTGRES_DB=zabbix10 volumes:11 - postgres_data:/var/lib/postgresql/data12 networks:13 - zabbix_net1415 zabbix-server:16 image: zabbix/zabbix-server-pgsql:latest17 environment:18 - DB_SERVER_HOST=postgres19 - POSTGRES_USER=zabbix20 - POSTGRES_PASSWORD=${POSTGRES_PASSWORD}21 - POSTGRES_DB=zabbix22 ports:23 - "10051:10051"24 volumes:25 - zabbix_data:/var/lib/zabbix26 depends_on:27 - postgres28 networks:29 - zabbix_net3031 zabbix-web:32 image: zabbix/zabbix-web-nginx-pgsql:latest33 environment:34 - ZBX_SERVER_HOST=zabbix-server35 - DB_SERVER_HOST=postgres36 - POSTGRES_USER=zabbix37 - POSTGRES_PASSWORD=${POSTGRES_PASSWORD}38 - POSTGRES_DB=zabbix39 - PHP_TZ=UTC40 ports:41 - "8080:8080"42 - "8443:8443"43 depends_on:44 - zabbix-server45 networks:46 - zabbix_net4748 zabbix-agent:49 image: zabbix/zabbix-agent:latest50 environment:51 - ZBX_SERVER_HOST=zabbix-server52 - ZBX_HOSTNAME=zabbix-agent53 privileged: true54 pid: host55 depends_on:56 - zabbix-server57 networks:58 - zabbix_net5960 zabbix-agent2:61 image: zabbix/zabbix-agent2:latest62 environment:63 - ZBX_SERVER_HOST=zabbix-server64 - ZBX_HOSTNAME=zabbix-agent265 volumes:66 - /var/run/docker.sock:/var/run/docker.sock:ro67 depends_on:68 - zabbix-server69 networks:70 - zabbix_net7172volumes:73 postgres_data:74 zabbix_data:7576networks:77 zabbix_net:78EOF7980# 2. Create the .env file81cat > .env << 'EOF'82# Zabbix Monitoring83POSTGRES_PASSWORD=secure_postgres_password8485# Zabbix Web at http://localhost:808086# Default: Admin/zabbix87EOF8889# 3. Start the services90docker compose up -d9192# 4. View logs93docker 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-complete/run | bashTroubleshooting
- Zabbix server cannot connect to database: Verify POSTGRES_PASSWORD environment variable matches across all services and check postgres container logs for authentication errors
- Web interface shows 'Zabbix server is not running': Ensure zabbix-server container started successfully and check port 10051 connectivity between web and server containers
- Items showing 'Timeout while connecting to Zabbix Agent': Configure host firewall rules to allow connections from zabbix-server container IP range on port 10050
- High database CPU usage with slow queries: Implement PostgreSQL query optimization by creating indexes on history and trends tables, consider partitioning for large datasets
- Agent auto-registration failing: Verify ZBX_SERVER_HOST environment variable in agent containers points to correct zabbix-server service name and check network connectivity
- SNMP monitoring not working: Confirm SNMP community strings or v3 credentials are correct and target devices have SNMP enabled with proper access control lists
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-webzabbix-agentpostgresqlnginx
Tags
#zabbix#monitoring#enterprise#alerting#snmp
Category
Monitoring & ObservabilityAd Space
Shortcuts: C CopyF FavoriteD Download