wazuh / wazuh-dashboard

Wazuh dashboard, the Wazuh UI platform
https://wazuh.com
Apache License 2.0
36 stars 56 forks source link

Add the ability to change the default `manager.name` filter (better server migration support) #189

Open theblackhole opened 5 months ago

theblackhole commented 5 months ago

There's a problem with the current default filter system : you can't change the manager.name filter. This is an issue when you migrate your data from one server to another and they don't have the same name.

Indeed, we had an old wazuh server called wazuh-server. We had to shut it down but we still need to search old data so I deployed a less powerful/expensive archive server called wazuh-archive. I followed the backup-restore procedure described in the documentation in order to migrate the data to the archive server. With some tweaks related to the small RAM, everything worked (including restoring old logs)

The problem is that because of the default filter manager.name which is automatically set to the name of the current server and which cannot be changed, it is impossible to show the security events of the old server wazuh-server.

screenshot of the default filter 'wazuh-archive' where it shows no results

I know logs has been indexed because when I create a new filter, the old server appears in the list...

screenshot of the 'add filter' popup where we can see both 'wazuh-archive' and 'wazuh-server' in a list

...but of course I can't use them together

screenshot showing both filters activated and no results

Update : I deployed a new wazuh archive server with the same hostname as the old one (wazuh-server) and it worked. This confirms that my backups are good and that it is indeed a problem with the default filter behaviour

screenshot showing working archive server if it's the same name as the old one
paulo-gervilla commented 2 months ago

Same problem here!