This project provides a seamless integration between Wazuh, a free and open-source security platform, and OpenSearch, a community-driven, open-source search and analytics suite. This integration allows for efficient log management, security event analysis, and real-time monitoring of your infrastructure.
The setup includes:
- Wazuh manager for security event collection and analysis
- OpenSearch cluster for powerful search and analytics capabilities
- OpenSearch Dashboards for visualization and data exploration
- Logstash for data processing and ingestion into OpenSearch
- Custom Docker image combining Wazuh and Logstash for simplified deployment
- Two-node OpenSearch cluster for high availability
- Automated setup process with environment validation
- Centralized configuration management
- Scalable architecture suitable for production environments
- Docker (version 19.03 or later)
- Docker Compose (version 1.27 or later)
- Git
- Bash shell
- At least 4GB of RAM available for the containers
-
Clone the repository:
git clone https://github.com/openarmor/osdls.git cd osdls
-
Create a
.env
file in the project root with the following content:OPENSEARCH_INITIAL_ADMIN_PASSWORD=your_secure_password OPENSEARCH_PASSWORD=your_secure_password OPENSEARCH_USERNAME=admin LOGSTASH_KEYSTORE_PASS=your_secure_password
Replace
your_secure_password
with strong, unique passwords. -
Run the setup script:
chmod +x setup.sh ./setup.sh
-
Once the setup is complete, access OpenSearch Dashboards at
http://localhost:5601
.
The setup.sh
script performs the following actions:
- Validates the environment and prerequisites
- Builds a custom Docker image containing Wazuh and Logstash
- Updates the
docker-compose.yml
file to use the custom image - Starts the services using Docker Compose
For manual setup or customization, refer to the individual component configurations in the docker-compose.yml
file.
Wazuh configuration files are located in the wazuh-config
volume. To modify Wazuh settings:
- Access the Wazuh container:
docker exec -it wazuh /bin/bash
- Edit the configuration files in
/var/ossec/etc/
. - Restart the Wazuh manager:
supervisorctl restart wazuh-manager
OpenSearch settings can be adjusted in the docker-compose.yml
file under the opensearch-node1
and opensearch-node2
services. For advanced configurations, refer to the OpenSearch documentation.
Logstash configuration is located in logstash/config/logstash.conf
. Modify this file to adjust data processing rules or add new input/output plugins.
After setup, you can:
- Use Wazuh agents to collect security data from your infrastructure
- Search and analyze data using OpenSearch Dashboards
- Create custom dashboards and visualizations in OpenSearch Dashboards
- Set up alerts and notifications based on security events
- If services fail to start, check the Docker logs:
docker-compose logs
- Ensure all required ports are available and not in use by other services
- Verify that the passwords in the
.env
file meet the complexity requirements
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.
For support, please open an issue in the GitHub repository or contact the maintainers directly.