-
Notifications
You must be signed in to change notification settings - Fork 186
Customization
The recent plugin versions support to customize some images of the plugin. They are:
- Menu
- Health check
- Sidebar
- Reports
This is possible through plugin settings: customization.logo.<LOCATION>
. Its value must be a partial path whose base is <PLUGIN_PLATFORM_PATH>/plugins/wazuh/target/assets
.
The files should be located in <PLUGIN_PLATFORM_PATH>/plugins/wazuh/target/assets
directory.
Where:
-
<PLUGIN_PLATFORM_PATH>
is the path to the plugin platform. By default, depending on the plugin platform:- Kibana:
/usr/share/kibana
- Wazuh dashboard:
/usr/share/wazuh-dashboard
- Kibana:
Locations:
-
app
:- setting:
customization.logo.app
- location: plugin menu
- recommended image: 300x70px in png, jgp, svg
- another size: keep width/height proportions of the recommended image 300/70
- setting:
-
sidebar
- setting:
customization.logo.sidebar
- location: category of plugin in the platform menu
- recommended image: 80x80px in png, jgp, svg
- another size: keep square proportions width/height 1x1
- setting:
-
healthcheck
- setting:
customization.logo.healthcheck
- location: plugin health check
- recommended image: 300x70px in png, jgp, svg
- another size: the width image will be adjusted, and the height value will keep the proportions. Square or horizontal images should work.
- setting:
-
reports
- setting:
customization.logo.reports
- location: PDF reports generated by the Wazuh plugin
- recommended image: 370x75px in png, jgp
- another size: keep width/height (370/75) proportions of the recommended image, otherwise the PDF text could be overlaid.
- setting:
Example:
Customize the image displayed in the menu.
Image: menu_image.png
(in the plugin configuration, we define where the file is located).
Steps:
-
Copy the image to
<PLUGIN_PLATFORM_PATH>/plugins/wazuh/target/assets
, so the path of the file will be<PLUGIN_PLATFORM_PATH>/plugins/wazuh/target/assets/menu_image.png
. -
Configure the setting in the plugin configuration file
wazuh.yml
or using from the UI in the Settings/Configuration section.
customization.logo.app: menu_image.png
Note you can put the image in a subdirectory of
<PLUGIN_PLATFORM_PATH>/plugins/wazuh/target/assets
, so the setting configuration shoulb include this subpath.
Some users want to customize some branding texts, as the Wazuh
name in the plugin platform menu, but this customization is not currently supported by the plugin through settings.
We will describe some workarounds to apply the customizations over the installed plugin, editing the code of the built plugin.
- Replace the category label in the plugin platform menu.
sed -i 's|label:"Wazuh"|label:"<PLUGIN_CATEGORY_LABEL>"|g' <PATH_TO_WAZUH_PLUGIN_ROOT>/target/public/wazuh.plugin.js
Where:
-
<PLUGIN_CATEGORY_LABEL>
is the category label. -
<PATH_TO_WAZUH_PLUGIN_ROOT>
is the path to the Wazuh plugin files are located in the file system. By default, depending on the plugin platform:- Kibana:
/usr/share/kibana/plugins/wazuh
- Wazuh dashboard:
/usr/share/wazuh-dashboard/plugins/wazuh
- Kibana:
- Rebuild the compressed files. It requires the
gzip
andbrotli
packages. Ensure you have these packages or install them.
gzip -c <PATH_TO_WAZUH_PLUGIN_ROOT>/target/public/wazuh.plugin.js > <PATH_TO_WAZUH_PLUGIN_ROOT>/target/public/wazuh.plugin.js.gz
brotli -c <PATH_TO_WAZUH_PLUGIN_ROOT>/target/public/wazuh.plugin.js > <PATH_TO_WAZUH_PLUGIN_ROOT>/target/public/wazuh.plugin.js.br
Where:
-
<PATH_TO_WAZUH_PLUGIN_ROOT>
is the path to the Wazuh plugin files are located in the file system. By default, depending on the plugin platform:- Kibana:
/usr/share/kibana/plugins/wazuh
- Wazuh dashboard:
/usr/share/wazuh-dashboard/plugins/wazuh
- Kibana:
Example:
- plugin platform:
Wazuh dashboard
- plugin name:
Custom category
# Change the category name in the plugin platform menu
sed -i 's|label:"Wazuh"|label:"Custom category"|g' /usr/share/wazuh-dashboard/plugins/wazuh/target/public/wazuh.plugin.js
# Build the compressed files
gzip -c /usr/share/wazuh-dashboard/plugins/wazuh/target/public/wazuh.plugin.js > /usr/share/wazuh-dashboard/plugins/wazuh/target/public/wazuh.plugin.js.gz
brotli -c /usr/share/wazuh-dashboard/plugins/wazuh/target/public/wazuh.plugin.js > /usr/share/wazuh-dashboard/plugins/wazuh/target/public/wazuh.plugin.js.br
- Replace the plugin name in the plugin platform menu.
sed -i 's|title:"Wazuh"|title:"<PLUGIN_TITLE>"|g' <PATH_TO_WAZUH_PLUGIN_ROOT>/target/public/wazuh.plugin.js
Where:
-
<PLUGIN_TITLE>
is the plugin display name. -
<PATH_TO_WAZUH_PLUGIN_ROOT>
is the path to the Wazuh plugin files are located in the file system. By default, depending on the plugin platform:- Kibana:
/usr/share/kibana/plugins/wazuh
- Wazuh dashboard:
/usr/share/wazuh-dashboard/plugins/wazuh
- Kibana:
- Rebuild the compressed files. It requires the
gzip
andbrotli
packages. Ensure you have these packages or install them.
gzip -c <PATH_TO_WAZUH_PLUGIN_ROOT>/target/public/wazuh.plugin.js > <PATH_TO_WAZUH_PLUGIN_ROOT>/target/public/wazuh.plugin.js.gz
brotli -c <PATH_TO_WAZUH_PLUGIN_ROOT>/target/public/wazuh.plugin.js > <PATH_TO_WAZUH_PLUGIN_ROOT>/target/public/wazuh.plugin.js.br
Where:
-
<PATH_TO_WAZUH_PLUGIN_ROOT>
is the path to the Wazuh plugin files are located in the file system. By default, depending on the plugin platform:- Kibana:
/usr/share/kibana/plugins/wazuh
- Wazuh dashboard:
/usr/share/wazuh-dashboard/plugins/wazuh
- Kibana:
Example:
- plugin platform:
Wazuh dashboard
- plugin name:
Custom plugin
# Change the plugin name in the plugin platform menu
sed -i 's|title:"Wazuh"|title:"Custom plugin"|g' /usr/share/wazuh-dashboard/plugins/wazuh/target/public/wazuh.plugin.js
# Build the compressed files
gzip -c /usr/share/wazuh-dashboard/plugins/wazuh/target/public/wazuh.plugin.js > /usr/share/wazuh-dashboard/plugins/wazuh/target/public/wazuh.plugin.js.gz
brotli -c /usr/share/wazuh-dashboard/plugins/wazuh/target/public/wazuh.plugin.js > /usr/share/wazuh-dashboard/plugins/wazuh/target/public/wazuh.plugin.js.br
- Replace the plugin name in the browser tab name.
sed -i 's/chrome\.docTitle\.change("Wazuh"/chrome\.docTitle\.change("<PLUGIN_NAME>"/' <PATH_TO_WAZUH_PLUGIN_ROOT>/target/public/wazuh.chunk.9.js
Where:
-
<PLUGIN_NAME>
is the name you want to display. The final result could look like:<PLUGIN_NAME> - <PLUGIN_PLATFORM_NAME>
(<PLUGIN_PLATFORM_NAME>
can be defined with Wazuh dashboard options) -
<PATH_TO_WAZUH_PLUGIN_ROOT>
is the path to the Wazuh plugin files are located in the file system. By default, depending on the plugin platform:- Kibana:
/usr/share/kibana/plugins/wazuh
- Wazuh dashboard:
/usr/share/wazuh-dashboard/plugins/wazuh
- Kibana:
- Rebuild the compressed files. It requires the
gzip
andbrotli
packages. Ensure you have these packages or install them.
gzip -c <PATH_TO_WAZUH_PLUGIN_ROOT>/target/public/wazuh.chunk.9.js > <PATH_TO_WAZUH_PLUGIN_ROOT>/target/public/wazuh.chunk.9.js.gz
brotli -c <PATH_TO_WAZUH_PLUGIN_ROOT>/target/public/wazuh.chunk.9.js > <PATH_TO_WAZUH_PLUGIN_ROOT>/target/public/wazuh.chunk.9.js.br
Where:
-
<PATH_TO_WAZUH_PLUGIN_ROOT>
is the path to the Wazuh plugin files are located in the file system. By default, depending on the plugin platform:- Kibana:
/usr/share/kibana/plugins/wazuh
- Wazuh dashboard:
/usr/share/wazuh-dashboard/plugins/wazuh
- Kibana:
Example:
- plugin platform:
Wazuh dashboard
- plugin name:
Custom plugin
# Change plugin name in the browser tab name
sed -i 's/chrome\.docTitle\.change("Wazuh"/chrome\.docTitle\.change("Custom plugin"/' /usr/share/wazuh-dashboard/plugins/wazuh/target/public/wazuh.chunk.9.js
# Build the compressed files
gzip -c /usr/share/wazuh-dashboard/target/public/wazuh.chunk.9.js > /usr/share/wazuh-dashboard/target/public/wazuh.chunk.9.js.gz
brotli -c /usr/share/wazuh-dashboard/target/public/wazuh.chunk.9.js > /usr/share/wazuh-dashboard/target/public/wazuh.chunk.9.js.br
# Change the text
sed -i 's|Wazuh support|<CUSTOM_SUPPORT>|' <PLUGIN_PLATFORM_PATH_ROOT>/target/public/wazuh.plugin.js
# Build the compressed files
gzip -c <PLUGIN_PLATFORM_PATH_ROOT>/target/public/wazuh.plugin.js > <PLUGIN_PLATFORM_PATH_ROOT>/target/public/wazuh.plugin.js.gz
brotli -c <PLUGIN_PLATFORM_PATH_ROOT>/target/public/wazuh.plugin.js > <PLUGIN_PLATFORM_PATH_ROOT>/target/public/wazuh.plugin.js.br
Where:
-
<CUSTOM_SUPPORT>
is the custom text -
<PATH_TO_WAZUH_PLUGIN_ROOT>
is the path to the Wazuh plugin files are located in the file system. By default, depending on the plugin platform:- Kibana:
/usr/share/kibana/plugins/wazuh
- Wazuh dashboard:
/usr/share/wazuh-dashboard/plugins/wazuh
- Kibana:
Example:
- plugin platform: Wazuh dashboard
- custom support: Custom support
# Change the text
sed -i 's|Wazuh support|Custom support|' /usr/share/wazuh-dashboard/plugins/wazuh/target/public/wazuh.plugin.js
# Build the compressed files
gzip -c /usr/share/wazuh-dashboard/plugins/wazuh/target/public/wazuh.plugin.js > /usr/share/wazuh-dashboard/plugins/wazuh/target/public/wazuh.plugin.js.gz
brotli -c /usr/share/wazuh-dashboard/plugins/wazuh/target/public/wazuh.plugin.js > /usr/share/wazuh-dashboard/plugins/wazuh/target/public/wazuh.plugin.js.br
# Change the URL to the image file
sed -i 's|prepend(Object(assets\["b"\])("icon.svg"))})," Documentation"|prepend("<SUBPATH_TO_SERVED_ASSET>")})," Documentation"|' <PATH_TO_WAZUH_PLUGIN_ROOT>/target/public/wazuh.plugin.js
# Build the compressed files
gzip -c <PATH_TO_WAZUH_PLUGIN_ROOT>/target/public/wazuh.plugin.js > <PATH_TO_WAZUH_PLUGIN_ROOT>/target/public/wazuh.plugin.js.gz
brotli -c <PATH_TO_WAZUH_PLUGIN_ROOT>/target/public/wazuh.plugin.js > <PATH_TO_WAZUH_PLUGIN_ROOT>/target/public/wazuh.plugin.js.br
Where:
-
<SUBPATH_TO_SERVED_ASSET>
is the subpath to the file served in the server -
<PATH_TO_WAZUH_PLUGIN_ROOT>
is the path to the Wazuh plugin files are located in the file system. By default, depending on the plugin platform:- Kibana:
/usr/share/kibana/plugins/wazuh
- Wazuh dashboard:
/usr/share/wazuh-dashboard/plugins/wazuh
- Kibana:
Example:
- plugin platform: Wazuh dashboard
- file served in:
plugins/wazuh/assets/custom_image.png
(file located in the file system in:/usr/share/wazuh-dashboard/plugins/wazuh/public/assets/custom_image.png
)
# Change the URL to the image file
sed -i 's|prepend(Object(assets\["b"\])("icon.svg"))})," Documentation"|prepend("plugins/wazuh/assets/custom_image.png")})," Documentation"|' /usr/share/wazuh-dashboard/plugins/wazuh/target/public/wazuh.plugin.js
# Build the compressed files
gzip -c /usr/share/wazuh-dashboard/plugins/wazuh/target/public/wazuh.plugin.js > /usr/share/wazuh-dashboard/plugins/wazuh/target/public/wazuh.plugin.js.gz
brotli -c /usr/share/wazuh-dashboard/plugins/wazuh/target/public/wazuh.plugin.js > /usr/share/wazuh-dashboard/plugins/wazuh/target/public/wazuh.plugin.js.br
ℹ️ This metric is in the Security events module.
# Change the minimum level in the metric
sed -i 's/name:"Level 12 or above alerts",type:"range",gte:"12"/name:"Level <ALERT_LEVEL> or above alerts",type:"range",gte:"<ALERT_LEVEL>"/' <PATH_TO_WAZUH_PLUGIN_ROOT>/target/public/wazuh.chunk.9.js
# Build the compressed files
gzip -c <PATH_TO_WAZUH_PLUGIN_ROOT>/target/public/wazuh.chunk.9.js > <PATH_TO_WAZUH_PLUGIN_ROOT>/target/public/wazuh.chunk.9.js.gz
brotli -c <PATH_TO_WAZUH_PLUGIN_ROOT>/target/public/wazuh.chunk.9.js > <PATH_TO_WAZUH_PLUGIN_ROOT>/target/public/wazuh.chunk.9.js.br
Where:
-
<ALERT_LEVEL>
is the minimum alert level to consider in the metric -
<PATH_TO_WAZUH_PLUGIN_ROOT>
is the path to the Wazuh plugin files are located in the file system. By default, depending on the plugin platform:- Kibana:
/usr/share/kibana/plugins/wazuh
- Wazuh dashboard:
/usr/share/wazuh-dashboard/plugins/wazuh
- Kibana:
Example:
- plugin platform: Wazuh dashboard
- minimum alert level: 8
# Change the minimum level in the metric
sed -i 's/name:"Level 12 or above alerts",type:"range",gte:"12"/name:"Level 8 or above alerts",type:"range",gte:"8"/' /usr/share/wazuh-dashboard/plugins/wazuh/target/public/wazuh.chunk.9.js
# Build the compressed files
gzip -c /usr/share/wazuh-dashboard/plugins/wazuh/target/public/wazuh.chunk.9.js > /usr/share/wazuh-dashboard/plugins/wazuh/target/public/wazuh.chunk.9.js.gz
brotli -c /usr/share/wazuh-dashboard/plugins/wazuh/target/public/wazuh.chunk.9.js > /usr/share/wazuh-dashboard/plugins/wazuh/target/public/wazuh.chunk.9.js.br
ℹ️ For Wazuh 4.4.0 or higher, this can be done through a plugin setting.
- Edit the value of
REPORTS_PAGE_HEADER_TEXT
variable in the<PATH_TO_WAZUH_PLUGIN_ROOT>/common/constants.js
file:
const REPORTS_PAGE_HEADER_TEXT = '[email protected]\nhttps://wazuh.com';
Where:
-
<PATH_TO_WAZUH_PLUGIN_ROOT>
is the path to the Wazuh plugin files are located in the file system. By default, depending on the plugin platform:- Kibana:
/usr/share/kibana/plugins/wazuh
- Wazuh dashboard:
/usr/share/wazuh-dashboard/plugins/wazuh
- Kibana:
- Restart the Kibana/Wazuh dashboard service
# Change the link text
sed -i 's|Wazuh documentation|<CUSTOM_LINK_TEXT>|' <PATH_TO_PLUGIN_PLATFORM_ROOT>/src/core/target/public/core.entry.js
# Build the compressed files
gzip -c <PATH_TO_PLUGIN_PLATFORM_ROOT>/src/core/target/public/core.entry.js > <PATH_TO_PLUGIN_PLATFORM_ROOT>/src/core/target/public/core.entry.js.gz
brotli -c <PATH_TO_PLUGIN_PLATFORM_ROOT>/src/core/target/public/core.entry.js > <PATH_TO_PLUGIN_PLATFORM_ROOT>/src/core/target/public/core.entry.js.br
Where:
-
<CUSTOM_LINK_TEXT>
is the link text -
<PATH_TO_PLUGIN_PLATFORM_ROOT>
is the path to the plugin platform files are located in the file system. By default, depending on the plugin platform:- Wazuh dashboard:
/usr/share/wazuh-dashboard
- Wazuh dashboard:
Example:
- plugin platform: Wazuh dashboard
- custom link text: Custom documentation
# Change the link text
sed -i 's|Wazuh documentation|Custom documentation|' /usr/share/wazuh-dashboard/src/core/target/public/core.entry.js
# Build the compressed files
gzip -c /usr/share/wazuh-dashboard/src/core/target/public/core.entry.js > /usr/share/wazuh-dashboard/src/core/target/public/core.entry.js.gz
brotli -c /usr/share/wazuh-dashboard/src/core/target/public/core.entry.js > /usr/share/wazuh-dashboard/src/core/target/public/core.entry.js.br
# Change the link text
sed -i 's|Ask Wazuh|<CUSTOM_ASK>|' <PATH_TO_PLUGIN_PLATFORM_ROOT>/src/core/target/public/core.entry.js
# Build the compressed files
gzip -c <PATH_TO_PLUGIN_PLATFORM_ROOT>/src/core/target/public/core.entry.js > <PATH_TO_PLUGIN_PLATFORM_ROOT>/src/core/target/public/core.entry.js.gz
brotli -c <PATH_TO_PLUGIN_PLATFORM_ROOT>/src/core/target/public/core.entry.js > <PATH_TO_PLUGIN_PLATFORM_ROOT>/src/core/target/public/core.entry.js.br
Where:
-
<CUSTOM_ASK>
is the link text -
<PATH_TO_PLUGIN_PLATFORM_ROOT>
is the path to the plugin platform files are located in the file system. By default, depending on the plugin platform:- Wazuh dashboard:
/usr/share/wazuh-dashboard
- Wazuh dashboard:
Example:
- plugin platform: Wazuh dashboard
- custom ask: Ask custom
# Change the link text
sed -i 's|Ask Wazuh|Ask custom|' /usr/share/wazuh-dashboard/src/core/target/public/core.entry.js
# Build the compressed files
gzip -c /usr/share/wazuh-dashboard/src/core/target/public/core.entry.js > /usr/share/wazuh-dashboard/src/core/target/public/core.entry.js.gz
brotli -c /usr/share/wazuh-dashboard/src/core/target/public/core.entry.js > /usr/share/wazuh-dashboard/src/core/target/public/core.entry.js.br