-
Notifications
You must be signed in to change notification settings - Fork 203
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
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
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.
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, otherwhise the PDF text could be overlaid.
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, modificating the code of the built plugin.
- Replace the 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 catorory 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 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 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 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 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