Skip to content
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] After migration from 4.0.5 to 4.1.0 old tasklogs are not returned by "/api/v1/query?name=case-task-logs" query #1875

Closed
birigli opened this issue Mar 23, 2021 · 6 comments
Assignees
Labels
bug TheHive4 TheHive4 related issues
Milestone

Comments

@birigli
Copy link

birigli commented Mar 23, 2021

Request Type

Bug

Work Environment

Question Answer
OS version (server) Ubuntu, 18.04.5
OS version (client) Win 10
TheHive version / git hash 4.1.0-1
Package Type DEB

Problem Description

After upgrading from 4.0.5 to 4.1.0 (even from a fresh 4.0.5 instance) the tasklogs created in the older version do not show up in the GUI, as the underlying query: "/api/v1/query?name=case-task-logs" returns only the logs, created in the new version. The older tasklogs however can be retreived through the query used by thehive4py as well: "/api/case/task/log/_search".

Steps to Reproduce

  1. Install fresh 4.0.5
  2. Create a case with a task and create a tasklog
  3. Upgrade to 4.1.0

Complementary information

The following is the output of the "/api/v1/query?name=case-task-logs" query:

[
{'_id': '~8440', '_type': 'Log', '_createdBy': 'xxxx@yyyy', '_createdAt': 1616506014677, 'message': 'tasklog2', 'date': 1616506014677, 'owner': 'xxxx@yyyy', 'extraData': {'actionCount': 0}}
]

while this is a simple call of the get_task_logs() function in thehive4py:

[
{'_id': '~8440', 'id': '~8440', 'createdBy': 'xxxx@yyyy', 'createdAt': 1616506014677, '_type': 'case_task_log', 'message': 'tasklog2', 'startDate': 1616506014677, 'status': 'Ok', 'owner': 'xxxx@yyyy'},
{'_id': '~28816', 'id': '~28816', 'createdBy': 'xxxx@yyyy', 'createdAt': 1616500458934, '_type': 'case_task_log', 'message': 'tasklog', 'startDate': 1616500458934, 'status': 'Ok', 'owner': 'xxxx@yyyy'}
]
@birigli birigli added TheHive4 TheHive4 related issues bug labels Mar 23, 2021
@nadouani
Copy link
Contributor

Are all your indexes ok? Check it from the Administration > Platform Status

@birigli
Copy link
Author

birigli commented Mar 23, 2021

Yes, I've already checked them. Each index is green, I clicked "reindex" on Log, which has 2 entries according to that screen (and actually in fact). As now it is night here (CET), I can attach screenshot tomorrow, if you will.

Attached platform status report.
Platform-Status-Report-20210324-09_46+01_00.txt

@nulltiply
Copy link

Having the same issue with older task logs not showing. Platform status is showing all ok. 2 servers running Cassandra/HDFS on Debian and 1 server for TheHive on Debian as well.

@To-om To-om assigned To-om and unassigned nadouani Mar 25, 2021
@To-om To-om added this to the 4.1.2 milestone Mar 25, 2021
To-om added a commit that referenced this issue Mar 25, 2021
@To-om
Copy link
Contributor

To-om commented Mar 25, 2021

After the upgrate to TheHive 4.1.2, logs will reappear.

@birigli
Copy link
Author

birigli commented Mar 30, 2021

Well, tasklogs reappeared, many thanks!

@birigli
Copy link
Author

birigli commented Mar 30, 2021

And once I had a fresh 4.0.5 snapshot, I tested again, and attachments are there as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug TheHive4 TheHive4 related issues
Projects
None yet
Development

No branches or pull requests

4 participants