Skip to main content
The Wazuh Check Updates plugin provides update notification services and version checking functionality for the Wazuh Dashboard.

Plugin Class

WazuhCheckUpdatesPlugin

Location: plugins/wazuh-check-updates/public/plugin.ts:12

Lifecycle Methods

setup()

Initializes the plugin (no setup tasks required). Signature:
CoreSetup
required
OpenSearch Dashboards core setup contract
Returns: WazuhCheckUpdatesPluginSetup - Empty object

start()

Activates update checking services. Signature:
CoreStart
required
OpenSearch Dashboards core start contract
AppPluginStartDependencies
required
Plugin dependencies
Returns: WazuhCheckUpdatesPluginStart
React.ComponentType
React component for displaying update notifications
React.ComponentType
React component for dismissing update notifications
Function
Function to retrieve available updates

Public API

getAvailableUpdates()

Retrieves information about available Wazuh updates. Signature:
boolean
default:false
Only check if updates exist without fetching details
boolean
default:false
Force a fresh query, bypassing cache
Returns: Promise<AvailableUpdates>
string
API host identifier
string
Currently installed Wazuh version
object
Latest available major version
object
Latest available minor version
object
Latest available patch version
Example:

Components

UpdatesNotification

Displays update notifications in the UI. Usage:
Features:
  • Automatically checks for updates on mount
  • Displays notifications for major, minor, and patch updates
  • Provides links to release notes
  • Respects user dismissal preferences

DismissNotificationCheck

Allows users to dismiss update notifications. Usage:
Props: No props required - the component manages its own state.

Server Plugin

The server-side plugin manages update data and user preferences.

WazuhCheckUpdatesPlugin (Server)

Location: plugins/wazuh-check-updates/server/plugin.ts:37

setup() (Server)

Signature:
Server setup tasks:
  1. Registers saved object types - For storing update data and user preferences
  2. Creates router - Sets up HTTP endpoints
  3. Registers route handler context - Adds wazuh_check_updates context
Saved Object Types:

start() (Server)

Signature:
Server start tasks:
  1. Creates internal saved objects client - For background operations
  2. Initializes services - Sets up update checking logic
Returns: Empty object

Server Routes

The plugin exposes REST endpoints for update management.

GET /api/v1/wazuh-check-updates/updates

Retrieve available updates. Query Parameters:
string
API host ID to check updates for
boolean
default:false
Force fresh update check
Response:

POST /api/v1/wazuh-check-updates/dismiss

Dismiss update notifications. Request Body:
string
required
Version to dismiss notifications for
string
required
Type of update: “major”, “minor”, or “patch”
Example:
Response:

GET /api/v1/wazuh-check-updates/preferences

Retrieve user notification preferences. Response:

PUT /api/v1/wazuh-check-updates/preferences

Update user notification preferences. Request Body:
object
required
Map of dismissed update versions

Request Handler Context

The plugin extends the request handler context. Type Definition:
Usage:

Integration Example

Complete example of integrating update checks:

Best Practices

Check for updates when the application starts, but don’t block the UI:
Always check if the user has dismissed a notification before showing it:
Avoid checking for updates too frequently. Use the cached data:
Update checks may fail due to network issues. Handle errors without breaking the UI:

Main Plugin

Main dashboard plugin API

Wazuh Core

Core services and configuration

Update Guide

How to upgrade Wazuh

Release Notes

Wazuh release notes