-
Notifications
You must be signed in to change notification settings - Fork 640
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature Request] Add API to link alert and case after a broken migration from TH3 #2238
Comments
Thanks @To-om for this fix. We pushed to this version and began using the script right away. For the most part, it seems that the alerts won't get linked. Is there any way to troubleshoot this? Or is it possible that our SourceRef has some characters (-.:) causing this functionality to break? Below are some sample logs from running the script. The alerts should most definitely exist but not sure why they are not found.
|
The format of alert is
|
Here is an example of 2 docs:
|
The Are you sure you set the correct organisation in script? Do you see that alerts in TheHive interface ? |
Yes since we only had 1 organization. We don't see the alerts in TheHive 4 interface when searching. We used the sourceRef to search on. |
If you don't see the alerts in TheHive, it means that they haven't been migrated from TheHive 3. In that case, the links with them cannot be fixed. |
We are confident that the alerts were there after migration but over time went missing. Even alerts that were created after the migration seemed to have disappeared. Ever since 4.1.10 the alerts are staying and no longer going away. This is the issue we started with: #2188 and thought there was a chance this fix would bring them back. Maybe it's worth a shot to re-migrate? |
This is the command we ran for the migrate back on: sudo /opt/thehive/bin/migrate --drop-database --max-audit-age 1s --case-from-number 0 --output /etc/thehive/application.conf --main-organisation SOC --es-uri http://127.0.0.1:9200 We went from 3.5.1-1 to 4.1.2 (possibly) This should include alerts correct? |
Request Type
Feature Request
Feature Description
Related to #2232
The aim of this issue is to add an API for fixing broken links between alerts and cases after a migration from TheHive 3.
If possible, it is recommended to rerun migration from scratch using migration tool 4.1.13 or higher.
The script which reads alert from Elasticsearch 7 and uses the API to link with case could look like:
The text was updated successfully, but these errors were encountered: