This guide explains how to build the Wazuh Dashboard Plugins from source code into distributable packages.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/wazuh/wazuh-dashboard-plugins/llms.txt
Use this file to discover all available pages before exploring further.
Build Types
There are two primary build workflows:- Plugin-only builds - Build individual plugins as ZIP files for development
- System packages - Build complete DEB/RPM packages including the full dashboard distribution
Building Plugins from Source
This workflow builds only the plugins in this repository into distributable ZIP packages.Prerequisites
- Development environment configured (see Setup)
jqinstalled for reading plugin versions- Compatible Git reference from wazuh-indexer-plugins
Installing Dependencies
If dependencies are not already installed:External Resources
The main plugin downloads external resources during theyarn installation:
- Indexer resources from
wazuh-indexer-pluginsrepository - API specification files for endpoint generation
postinstall script automatically executes:
Building Individual Plugins
Each plugin must be built with the OpenSearch Dashboards version declared in itspackage.json.
Build Artifacts
Build artifacts are written to each plugin’sbuild/ directory:
plugins/main/build/wazuh-<version>.zipplugins/wazuh-core/build/wazuhCore-<version>.zipplugins/wazuh-check-updates/build/wazuhCheckUpdates-<version>.zip
Building Inside Docker
The recommended workflow is to build inside the Docker development environment. This ensures:- Required OpenSearch Dashboards build helpers are available
- Build matches the target platform
- Consistent build environment across different machines
Running from Sources
The recommended method for running plugins during development is using the Docker-based development environments.Starting the Development Environment
Navigate to the OpenSearch Dashboards development environment:plugins/wazuh-core/package.json and internal plugins from plugins/.
Specify Versions
To use specific OpenSearch and OpenSearch Dashboards versions:Development with Agents
Include Wazuh agents in the environment:SAML Environment
Enable SAML authentication:External Plugin Repositories
Mount external plugin repositories using the-r flag:
Environment Components
The Docker environment includes:- OpenSearch single-node cluster - Indexer for Wazuh data
- Wazuh manager - Real or local build depending on flags
- OpenSearch Dashboards dev environment - Bootstrapped with pre-compiled node modules
- Wazuh agents (optional) - Deployed based on
-aflag - Imposter - Mock server for testing
- Elasticsearch-exporter - Metrics adapter for Prometheus
Starting the Development Server
Attach a shell to the development container:- URL: https://0.0.0.0:5601/
- Default credentials:
admin:admin - SAML credentials:
wazuh:wazuh
Hot Reloading
The development server supports hot module reloading. Changes to plugin code are automatically detected and reloaded without restarting the server.Package Scripts
Themain plugin package.json includes several useful scripts:
Linting
Formatting
Testing
Building
API Data Generation
common/api-info/endpoints.json- API endpoint definitionscommon/api-info/security-actions.json- Security action definitions
Building System Packages
To build complete DEB or RPM system packages, see the detailed guide in the source repository atdocs/dev/build-packages.md. This process:
- Builds the base Wazuh Dashboard
- Builds all plugin dependencies
- Packages everything into distributable system packages
- Clone and build
wazuh-dashboard - Clone and build
wazuh-security-dashboards-plugin - Clone and build
wazuh-dashboard-plugins - Clone and build
wazuh-dashboard-reporting - Clone and build
wazuh-dashboard-security-analytics - Create ZIP packages
- Run
build-packages.shscript
~/workspace/source/docs/dev/build-packages.md for the complete workflow.
Troubleshooting
Missing Dependencies
If build fails with missing dependencies:OpenSearch Dashboards Version Mismatch
Ensure theOPENSEARCH_DASHBOARDS_VERSION environment variable matches the version in package.json:
Indexer Resources Download Failure
If themain plugin fails to download indexer resources, verify:
GIT_REFenvironment variable is set- The referenced branch/tag exists in
wazuh-indexer-plugins - Network connectivity to GitHub
Docker Build Issues
If building inside Docker fails:- Ensure sufficient resources allocated to Docker Desktop
- Check Docker daemon is running
- Verify networks exist:
docker network ls
Next Steps
- Run tests on the built plugins
- Contribute improvements
- Review source repository documentation