Security Monitoring Stack (SIEM)
Wazuh SIEM with Elasticsearch for log analysis, threat detection, and compliance monitoring
Overview
Wazuh is an open-source security monitoring platform that evolved from OSSEC, providing comprehensive threat detection, incident response, and compliance monitoring capabilities. The Wazuh manager serves as the central component that collects, analyzes, and correlates security events from agents deployed across your infrastructure, while also performing vulnerability assessments, configuration assessments, and file integrity monitoring. This stack combines the Wazuh manager with Wazuh indexer (based on OpenSearch) for scalable log storage and analysis, plus the Wazuh dashboard for visualization and management of security events, creating a complete SIEM solution. The integration enables real-time threat detection through rule-based analysis, machine learning algorithms, and threat intelligence feeds, while automatically correlating events across multiple sources to identify complex attack patterns. This configuration is ideal for security teams, compliance officers, and system administrators who need enterprise-grade security monitoring without the licensing costs of commercial SIEM solutions, offering capabilities comparable to tools like Splunk or QRadar while maintaining full control over sensitive security data.
Key Features
- Real-time log analysis and correlation using Wazuh's rule engine with over 3,000 pre-built detection rules
- Host-based intrusion detection with rootkit detection, file integrity monitoring, and system call analysis
- Vulnerability assessment scanning with integration to CVE databases and OVAL definitions
- Compliance monitoring for PCI DSS, GDPR, HIPAA, NIST 800-53, and SOC 2 frameworks
- Active response capabilities allowing automated threat mitigation through custom scripts
- Threat intelligence integration with feeds from VirusTotal, AlienVault OTX, and custom IoC sources
- OpenSearch-based indexing providing fast search capabilities across terabytes of security logs
- Multi-tenant architecture supporting agent groups and role-based access control
Common Use Cases
- 1Security operations center (SOC) deployment for centralized threat monitoring and incident response
- 2Compliance auditing and reporting for organizations requiring regulatory adherence documentation
- 3Cloud security monitoring for AWS, Azure, and GCP environments with API-based log collection
- 4Network security monitoring through integration with firewalls, IDS/IPS, and network devices
- 5Endpoint detection and response (EDR) for workstations and servers across hybrid infrastructures
- 6DevSecOps integration providing security monitoring for containerized applications and CI/CD pipelines
- 7Managed security service provider (MSSP) deployments supporting multiple client environments
Prerequisites
- Minimum 8GB RAM allocated to Docker (4GB for indexer, 2GB for manager, 2GB for dashboard)
- At least 50GB available disk space for log storage and indexer data retention
- Ports 1514/TCP, 1515/TCP, 514/UDP, 55000/TCP, and 5601/TCP available for agent communication and web access
- Basic understanding of security event analysis, log parsing, and SIEM concepts
- Network connectivity from monitored hosts to the Wazuh manager for agent enrollment and communication
- SSL certificate management knowledge for production deployments requiring encrypted communication
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 wazuh-indexer: 3 image: wazuh/wazuh-indexer:latest4 container_name: wazuh-indexer5 restart: unless-stopped6 environment: 7 - "OPENSEARCH_JAVA_OPTS=-Xms1g -Xmx1g"8 - "bootstrap.memory_lock=true"9 - "discovery.type=single-node"10 - "plugins.security.ssl.http.enabled=false"11 ulimits: 12 memlock: 13 soft: -114 hard: -115 nofile: 16 soft: 6553617 hard: 6553618 volumes: 19 - wazuh_indexer_data:/var/lib/wazuh-indexer2021 wazuh-manager: 22 image: wazuh/wazuh-manager:latest23 container_name: wazuh-manager24 restart: unless-stopped25 ports: 26 - "1514:1514"27 - "1515:1515"28 - "514:514/udp"29 - "55000:55000"30 environment: 31 - INDEXER_URL=https://wazuh-indexer:920032 - INDEXER_USERNAME=admin33 - INDEXER_PASSWORD=${INDEXER_PASSWORD}34 - FILEBEAT_SSL_VERIFICATION_MODE=none35 volumes: 36 - wazuh_api_config:/var/ossec/api/configuration37 - wazuh_etc:/var/ossec/etc38 - wazuh_logs:/var/ossec/logs39 - wazuh_queue:/var/ossec/queue40 - wazuh_var_multigroups:/var/ossec/var/multigroups41 - wazuh_integrations:/var/ossec/integrations42 - wazuh_active_response:/var/ossec/active-response/bin43 - wazuh_agentless:/var/ossec/agentless44 - wazuh_wodles:/var/ossec/wodles45 - filebeat_etc:/etc/filebeat46 - filebeat_var:/var/lib/filebeat47 depends_on: 48 - wazuh-indexer4950 wazuh-dashboard: 51 image: wazuh/wazuh-dashboard:latest52 container_name: wazuh-dashboard53 restart: unless-stopped54 ports: 55 - "${DASHBOARD_PORT:-5601}:5601"56 environment: 57 - INDEXER_USERNAME=admin58 - INDEXER_PASSWORD=${INDEXER_PASSWORD}59 - WAZUH_API_URL=https://wazuh-manager60 - DASHBOARD_USERNAME=kibanaserver61 - DASHBOARD_PASSWORD=${DASHBOARD_PASSWORD}62 - API_USERNAME=wazuh-wui63 - API_PASSWORD=${API_PASSWORD}64 depends_on: 65 - wazuh-indexer66 - wazuh-manager6768volumes: 69 wazuh_indexer_data: 70 wazuh_api_config: 71 wazuh_etc: 72 wazuh_logs: 73 wazuh_queue: 74 wazuh_var_multigroups: 75 wazuh_integrations: 76 wazuh_active_response: 77 wazuh_agentless: 78 wazuh_wodles: 79 filebeat_etc: 80 filebeat_var: .env Template
.env
1# Wazuh SIEM Stack2DASHBOARD_PORT=560134# Passwords (change these!)5INDEXER_PASSWORD=SecretPassword6DASHBOARD_PASSWORD=SecretPassword7API_PASSWORD=SecretPasswordUsage Notes
- 1Wazuh Dashboard at http://localhost:5601
- 2Default login: admin / SecretPassword
- 3Install Wazuh agents on hosts to monitor
- 4Agents connect to port 1514 (TCP) or 1515 (TCP)
- 5Syslog collection on port 514 (UDP)
- 6API accessible at port 55000
Individual Services(3 services)
Copy individual services to mix and match with your existing compose files.
wazuh-indexer
wazuh-indexer:
image: wazuh/wazuh-indexer:latest
container_name: wazuh-indexer
restart: unless-stopped
environment:
- OPENSEARCH_JAVA_OPTS=-Xms1g -Xmx1g
- bootstrap.memory_lock=true
- discovery.type=single-node
- plugins.security.ssl.http.enabled=false
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
volumes:
- wazuh_indexer_data:/var/lib/wazuh-indexer
wazuh-manager
wazuh-manager:
image: wazuh/wazuh-manager:latest
container_name: wazuh-manager
restart: unless-stopped
ports:
- "1514:1514"
- "1515:1515"
- 514:514/udp
- "55000:55000"
environment:
- INDEXER_URL=https://wazuh-indexer:9200
- INDEXER_USERNAME=admin
- INDEXER_PASSWORD=${INDEXER_PASSWORD}
- FILEBEAT_SSL_VERIFICATION_MODE=none
volumes:
- wazuh_api_config:/var/ossec/api/configuration
- wazuh_etc:/var/ossec/etc
- wazuh_logs:/var/ossec/logs
- wazuh_queue:/var/ossec/queue
- wazuh_var_multigroups:/var/ossec/var/multigroups
- wazuh_integrations:/var/ossec/integrations
- wazuh_active_response:/var/ossec/active-response/bin
- wazuh_agentless:/var/ossec/agentless
- wazuh_wodles:/var/ossec/wodles
- filebeat_etc:/etc/filebeat
- filebeat_var:/var/lib/filebeat
depends_on:
- wazuh-indexer
wazuh-dashboard
wazuh-dashboard:
image: wazuh/wazuh-dashboard:latest
container_name: wazuh-dashboard
restart: unless-stopped
ports:
- ${DASHBOARD_PORT:-5601}:5601
environment:
- INDEXER_USERNAME=admin
- INDEXER_PASSWORD=${INDEXER_PASSWORD}
- WAZUH_API_URL=https://wazuh-manager
- DASHBOARD_USERNAME=kibanaserver
- DASHBOARD_PASSWORD=${DASHBOARD_PASSWORD}
- API_USERNAME=wazuh-wui
- API_PASSWORD=${API_PASSWORD}
depends_on:
- wazuh-indexer
- wazuh-manager
Quick Start
terminal
1# 1. Create the compose file2cat > docker-compose.yml << 'EOF'3services:4 wazuh-indexer:5 image: wazuh/wazuh-indexer:latest6 container_name: wazuh-indexer7 restart: unless-stopped8 environment:9 - "OPENSEARCH_JAVA_OPTS=-Xms1g -Xmx1g"10 - "bootstrap.memory_lock=true"11 - "discovery.type=single-node"12 - "plugins.security.ssl.http.enabled=false"13 ulimits:14 memlock:15 soft: -116 hard: -117 nofile:18 soft: 6553619 hard: 6553620 volumes:21 - wazuh_indexer_data:/var/lib/wazuh-indexer2223 wazuh-manager:24 image: wazuh/wazuh-manager:latest25 container_name: wazuh-manager26 restart: unless-stopped27 ports:28 - "1514:1514"29 - "1515:1515"30 - "514:514/udp"31 - "55000:55000"32 environment:33 - INDEXER_URL=https://wazuh-indexer:920034 - INDEXER_USERNAME=admin35 - INDEXER_PASSWORD=${INDEXER_PASSWORD}36 - FILEBEAT_SSL_VERIFICATION_MODE=none37 volumes:38 - wazuh_api_config:/var/ossec/api/configuration39 - wazuh_etc:/var/ossec/etc40 - wazuh_logs:/var/ossec/logs41 - wazuh_queue:/var/ossec/queue42 - wazuh_var_multigroups:/var/ossec/var/multigroups43 - wazuh_integrations:/var/ossec/integrations44 - wazuh_active_response:/var/ossec/active-response/bin45 - wazuh_agentless:/var/ossec/agentless46 - wazuh_wodles:/var/ossec/wodles47 - filebeat_etc:/etc/filebeat48 - filebeat_var:/var/lib/filebeat49 depends_on:50 - wazuh-indexer5152 wazuh-dashboard:53 image: wazuh/wazuh-dashboard:latest54 container_name: wazuh-dashboard55 restart: unless-stopped56 ports:57 - "${DASHBOARD_PORT:-5601}:5601"58 environment:59 - INDEXER_USERNAME=admin60 - INDEXER_PASSWORD=${INDEXER_PASSWORD}61 - WAZUH_API_URL=https://wazuh-manager62 - DASHBOARD_USERNAME=kibanaserver63 - DASHBOARD_PASSWORD=${DASHBOARD_PASSWORD}64 - API_USERNAME=wazuh-wui65 - API_PASSWORD=${API_PASSWORD}66 depends_on:67 - wazuh-indexer68 - wazuh-manager6970volumes:71 wazuh_indexer_data:72 wazuh_api_config:73 wazuh_etc:74 wazuh_logs:75 wazuh_queue:76 wazuh_var_multigroups:77 wazuh_integrations:78 wazuh_active_response:79 wazuh_agentless:80 wazuh_wodles:81 filebeat_etc:82 filebeat_var:83EOF8485# 2. Create the .env file86cat > .env << 'EOF'87# Wazuh SIEM Stack88DASHBOARD_PORT=56018990# Passwords (change these!)91INDEXER_PASSWORD=SecretPassword92DASHBOARD_PASSWORD=SecretPassword93API_PASSWORD=SecretPassword94EOF9596# 3. Start the services97docker compose up -d9899# 4. View logs100docker 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/security-siem-stack/run | bashTroubleshooting
- Wazuh indexer failing to start with memory errors: Increase Docker memory allocation or reduce OPENSEARCH_JAVA_OPTS heap size from 1g to 512m
- Agents showing as disconnected in dashboard: Verify firewall rules allow connections to ports 1514/1515 and check agent configuration file for correct manager IP
- Dashboard login failing with authentication errors: Reset passwords using docker exec wazuh-manager /var/ossec/bin/wazuh-keystore and restart containers
- High CPU usage on wazuh-manager: Review active rules in /var/ossec/etc/rules and disable unnecessary decoders or reduce log verbosity
- Indexer running out of disk space: Configure index lifecycle policies in dashboard under Management > Index Management to automatically rotate old indices
- Missing security events in dashboard: Check filebeat configuration and verify log parsing by examining /var/ossec/logs/alerts/alerts.log for raw events
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
wazuh-managerwazuh-indexerwazuh-dashboardfilebeat
Tags
#wazuh#siem#security#elasticsearch#threat-detection#compliance
Category
Security & NetworkingAd Space
Shortcuts: C CopyF FavoriteD Download