-
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
ElasticSearch DB purge #299
Comments
Hi @Raf1ty, I don't really think there is a way to do that except by cooking a script that plays with Thehive APIs and probably Elasticsearch APIs. |
Hi @Raf1ty, If you can install the delete-by-query plugin, you can use this API call to delete all cases older than X days. I had to come up with this due to the case similarity bug described in #280.
|
Well, this is a bit dangerous, because there are a lot of relations for a case. This could end up with inconsistent data, if for example, you delete the case but not the task, observables and audit log entries related to it etc... |
Yes, it's not the safest thing, but neither is having a bug where I can't preview any alerts due to how many similar cases there are :) |
I agree with that. Issue #280 is blocking in your case. |
Thank you Nadouani, Miles, I will try to implement this functionnality into a script based on ES searches and theHive API. Thanks, |
This may help - I used a query like this to remove case tasks without a parent; you might be able to do something slightly modified to get observables too, but I've never tried it. The audit log poses a trickier task though; I never had issues stemming from case deletion, but like @nadouani said, this could be dangerous. Always double-check destructive actions :)
|
I'll close this issue, since TheHive doesn't provide this type of purge feature. We can discuss it on https://gitter.im/TheHive-Project/TheHive if needed. |
@Raf1ty Did you succeed to write a script to make this job? Thanks, |
Request Type
Information
Work Environment
Problem Description
Hello,
We need to purge our TheHive ES database because it take too many space on our server due to the high number of file observables.
Do you have an easy way to remove all the file observables data related to cases opened before x days and which has been closed as false positive?
Thank you in advance for your help!
Raphael
The text was updated successfully, but these errors were encountered: