-
Notifications
You must be signed in to change notification settings - Fork 624
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
[Bug] Missing cases migrating from TH3 to TH4 #1682
Comments
I tried migrating first the Main Org with cases from 1 to 500 and then migrating the Small Org: At the beginning of the migration, this errors are shown multiple times while preparing database:
It's been a day and the same log is shown every 5 seconds or so. Alert/Observable is the only field increasing and it started on 1.
Sometimes this warning is shown:
|
This log is also shown when migrating Small-Org. It's very slow, something seems wrong:
|
Also, when this exception shows up
All jobs failed to migrate. I don't know if it's just a coincidence:
|
In this state, when I try to import an alert in TH, it fails and this response is shown {"type":"NotFoundError","message":"Alert not found"} And when I click on a case, this log shows:
|
I also tried this on 4.0.4 and it's not working |
Another log that might be useful:
|
I have experienced pretty much the same behavior. [�[33mwarn�[0m] o.j.g.t.StandardJanusGraphTx - Query requires iterating over all vertices [(_label = User AND ~label = User AND login = xxx)]. For better performance, use indexes |
Currently, it is not possible to migrate several TH3 index in the same TH4 database because case number must be unique. This explains why you get |
Request Type
Bug
Work Environment
Problem Description
Some cases are missing when migrating multiple index from TH3 to different TH4 organizations.
Steps to Reproduce
./migrate --output /etc/thehive/application.conf --main-organisation Small-Org --es-index the_hive_small --es-uri http://elasticsearch:9200 --exclude-audit-actions Update,Creation,Delete
./migrate --output /etc/thehive/application.conf --main-organisation Medium-Org --es-index the_hive_medium --es-uri http://elasticsearch:9200 --exclude-audit-actions Update,Creation,Delete
./migrate --output /etc/thehive/application.conf --main-organisation Main-Org --es-index the_hive --es-uri http://elasticsearch:9200 --exclude-audit-actions Update,Creation,Delete
Possible Solutions
I think it could be a problem with the case numeration (see add. info. 3). I tried a few cases searching them by number, and there's only one case with each number in one organization. For example: if you find case 50 in org A, you won't find it in org B or C. If you find case 250 in org B, it won't exist on org A or C and so on.
Complementary information
Note that when using the
--es-index
option, _15 is always appended to the index name.Migration log seems to skip some cases:
Case: 338/1303 (965 exists) avg:10ms
As if 965 cases were already migrated, but they were not for this organization and from this index. (Altough it's a number very close to Small-Org + MediumOrg)
The text was updated successfully, but these errors were encountered: