The Wazuh Dashboard includes a comprehensive health check system that ensures all required components, configurations, and integrations are properly initialized before the application becomes fully operational.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.
Overview
The health check system performs automated verification and initialization tasks during Dashboard startup and runtime. These tasks ensure:- Index patterns exist and have correct field mappings
- Wazuh Server API connections are reachable and compatible
- Required saved objects and templates are created
- Notification channels are configured for alerting
- Alerting monitors are created for integrations
- Authentication modes are properly configured
Health Check Execution Contexts
Health check tasks execute in different contexts depending on the trigger:Internal Context
Tasks run automatically by the system during initialization or scheduled intervals. Types:internal-initial- First-time initialization tasksinternal-scheduled- Periodic maintenance tasksinternal- General internal tasks
User Context
Tasks triggered by user actions, such as navigating to a specific dashboard section or explicitly requesting a health check. Type:user- User-initiated tasks
Health Check Components
Index Patterns
The health check system ensures all required index patterns exist and have correct field mappings.Verified Index Patterns
- Events:
wazuh-events* - Monitoring:
wazuh-monitoring* - Statistics:
wazuh-statistics* - Vulnerabilities:
wazuh-states-vulnerabilities* - File Integrity Monitoring:
wazuh-states-fim* - Security Configuration Assessment:
wazuh-states-sca* - Inventory/IT Hygiene:
wazuh-states-inventory*
Index Pattern Tasks
Creation: If an index pattern does not exist, the health check creates it with appropriate field mappings. Field Mapping Verification: The system retrieves field mappings from matching indices and creates the index pattern with the correct schema. Pre-defined Fields: If matching indices do not exist, some index patterns are created with pre-defined field sets to support future data ingestion. Time Field Assignment: Index patterns are configured with the appropriate time field (typically@timestamp) for time-based filtering.
Server API Connection Compatibility
The health check verifies connectivity and version compatibility with configured Wazuh Server API hosts.Compatibility Checks
Version Matching: The Dashboard and Wazuh Server API versions are compared. Major and minor version numbers must match for compatibility. Example:- Dashboard version:
4.5.2 - Server API version:
v4.5.1 - Result: Compatible (major: 4, minor: 5 match)
Health Check Results
For each API host, the health check returns:Error Handling
If no compatible API hosts are available:Run As Authentication Check
The health check verifies that therun_as authentication mode is properly configured when enabled.
Run As Status Values
| Status | Description |
|---|---|
| Enabled | Run as is allowed for both user and host |
| Host Disabled | Run as is disabled in the Wazuh Server configuration |
| All Disabled | Run as is disabled in both host and user configuration |
| User Not Allowed | Run as is not permitted for the configured user |
| Unable to Check | Cannot determine run_as permission status |
Verification Process
- Retrieve all configured API hosts
- Check the
allow_run_asvalue from cluster information - Determine if run_as is enabled for each host
- Log warnings for hosts where run_as is not enabled
- Return list of hosts with run_as enabled
Error Handling
If run_as is required but not enabled:Templates
The health check ensures required OpenSearch index templates are created for Wazuh data. Template Name:wazuh-kibana
Purpose: Defines default settings and mappings for Wazuh indices
Saved Objects
The system verifies and creates required saved objects, including:- Visualizations
- Dashboards
- Searches
- Configuration objects
Notification Channels
The health check can automatically create default notification channels for common integrations.Supported Channels
- Slack: Webhook-based notifications to Slack channels
- PagerDuty: Incident creation via PagerDuty Events API
- Jira: Issue creation in Jira projects
- Shuffle: Automation workflow triggers
Default Channel Configuration
Channels are created with placeholder configurations that must be updated with actual credentials: Slack:Channel Verification
Before creating a new channel, the health check:- Queries existing notification configurations
- Checks if a channel with the target ID already exists
- Skips creation if the channel exists
- Creates the channel if it does not exist
Alerting Monitors
The health check creates sample alerting monitors for testing notification integrations.Sample Monitors
- Sample: Slack - Test monitor for Slack notifications
- Sample: PagerDuty - Test monitor for PagerDuty incidents
- Sample: Jira - Test monitor for Jira issue creation
- Sample: Shuffle - Test monitor for Shuffle workflows
Monitor Components
Schedule:1 (Critical)
Conditional Creation
Monitors are only created if the corresponding notification channel exists. This prevents monitors from being created without valid notification destinations.Health Check Workflow
Initialization Sequence
-
System Startup
- Dashboard service starts
- Health check system initializes
-
Context Determination
- Identify execution context (internal vs. user)
- Load relevant task list
-
Task Execution
- Execute tasks in defined order
- Each task performs verification and initialization
- Log results and errors
-
Result Aggregation
- Collect results from all tasks
- Determine overall health status
- Report success or failure
-
Error Handling
- Critical errors prevent Dashboard startup
- Warnings are logged but allow continued operation
- User-facing error messages guide remediation
Task Dependencies
Some tasks depend on others and execute in sequence:- Server API connection verification must succeed before other API-dependent tasks
- Index patterns must be created before related saved objects
- Notification channels must exist before monitors are created
Monitoring Health Check Status
Log Files
Health check activity is logged to the Dashboard log file:Log Messages
Successful Task:Health Check UI
The Dashboard may display health check status and errors in the user interface:- Health Check Screen: Displayed when critical initialization fails
- Status Indicators: Show component health in the interface
- Error Messages: Provide actionable guidance for resolving issues
Common Health Check Issues
Index Pattern Creation Failures
Symptom:- Verify Wazuh agents are sending data
- Check that the Wazuh indexer is properly configured
- Confirm index creation is working
- Review indexer logs for errors
API Connection Failures
Symptom:- Verify the Wazuh Server API service is running
- Check network connectivity
- Validate the URL and port in configuration
- Review firewall rules
- Verify SSL/TLS certificates if using HTTPS
Version Incompatibility
Symptom:- Update the Wazuh Server to match the Dashboard version
- Or downgrade the Dashboard to match the Server version
- Ensure all components are running compatible versions
Run As Configuration Issues
Symptom:allow_run_as enabled
Resolution:
- Edit the Wazuh Server configuration
- Enable
allow_run_asin the API settings - Restart the Wazuh Server API service
- Restart the Dashboard to re-run health checks
Notification Channel Creation Failures
Symptom: Notification channels are not created during initialization Cause: OpenSearch Notifications plugin is not available or misconfigured Resolution:- Verify the Notifications plugin is installed
- Check OpenSearch logs for plugin errors
- Manually create notification channels if automatic creation fails
Disabling Health Checks
Warning: Disabling health checks is not recommended for production environments. Health checks ensure system integrity and proper configuration. Disabling them may result in:- Missing or incorrectly configured index patterns
- Incompatible API connections causing errors
- Missing required saved objects and visualizations
- Non-functional notification and alerting features
Best Practices
- Monitor Logs: Regularly review Dashboard logs for health check warnings
- Version Compatibility: Keep all Wazuh components at compatible versions
- Network Connectivity: Ensure reliable connectivity between components
- Test After Updates: Verify health checks pass after system updates
- Document Custom Configurations: Track any customizations that affect health checks