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

Sorting alerts by severity fails #242

Closed
fl0wc0ntr0l opened this issue Jun 19, 2017 · 1 comment
Closed

Sorting alerts by severity fails #242

fl0wc0ntr0l opened this issue Jun 19, 2017 · 1 comment
Assignees
Labels
Milestone

Comments

@fl0wc0ntr0l
Copy link

Request Type

Bug

Work Environment

Question Answer
OS version (server) Ubuntu 16.04
OS version (client) Win 10
TheHive version / git hash 2.11.2
Package Type Docker
Browser type & version N/A

Problem Description

When attempting to sort Alerts by severity, the sort fails and if you leave the alerts window and return to it, no alerts are listed.

Steps to Reproduce

  1. Sort alerts by severity
  2. Leave alerts section of theHive
  3. Return to alerts section (no alerts listed)

Possible Solutions

Logs indicate the error is probably due to there being no mapping in ES for the threatLevel field to sort on:

[info] application - POST /api/alert/_search?range=0-15&sort=-threatLevel returned 500
org.elasticsearch.transport.RemoteTransportException: [Sara Grey][172.18.0.3:9300][indices:data/read/search]
Caused by: org.elasticsearch.action.search.SearchPhaseExecutionException: all shards failed
        at org.elasticsearch.action.search.AbstractSearchAsyncAction.onFirstPhaseResult(AbstractSearchAsyncAction.java:206)
        at org.elasticsearch.action.search.AbstractSearchAsyncAction$1.onFailure(AbstractSearchAsyncAction.java:152)
        at org.elasticsearch.action.ActionListenerResponseHandler.handleException(ActionListenerResponseHandler.java:46)
        at org.elasticsearch.transport.TransportService$DirectResponseChannel.processException(TransportService.java:874)
        at org.elasticsearch.transport.TransportService$DirectResponseChannel.sendResponse(TransportService.java:852)
        at org.elasticsearch.transport.TransportService$4.onFailure(TransportService.java:389)
        at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:39)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:748)
Caused by: org.elasticsearch.search.SearchParseException: No mapping found for [threatLevel] in order to sort on
        at org.elasticsearch.search.sort.SortParseElement.addSortField(SortParseElement.java:213)
        at org.elasticsearch.search.sort.SortParseElement.addCompoundSortField(SortParseElement.java:187)
        at org.elasticsearch.search.sort.SortParseElement.parse(SortParseElement.java:85)
        at org.elasticsearch.search.SearchService.parseSource(SearchService.java:856)
        at org.elasticsearch.search.SearchService.createContext(SearchService.java:667)
        at org.elasticsearch.search.SearchService.createAndPutContext(SearchService.java:633)
        at org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:377)
        at org.elasticsearch.search.action.SearchServiceTransportAction$SearchQueryTransportHandler.messageReceived(SearchServiceTransportAction.java:368)
        at org.elasticsearch.search.action.SearchServiceTransportAction$SearchQueryTransportHandler.messageReceived(SearchServiceTransportAction.java:365)
        at org.elasticsearch.transport.TransportRequestHandler.messageReceived(TransportRequestHandler.java:33)
@nadouani nadouani self-assigned this Jun 19, 2017
@nadouani nadouani added the bug label Jun 19, 2017
@nadouani nadouani added this to the 2.12.0 milestone Jun 19, 2017
@nadouani
Copy link
Contributor

This is in fact a regression introduced during the refactoring of the alerts pane.

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

No branches or pull requests

2 participants