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

Error with a SEARCH_RESULT_COUNT widget #3841

Closed
Azenet opened this issue May 17, 2017 · 1 comment
Closed

Error with a SEARCH_RESULT_COUNT widget #3841

Azenet opened this issue May 17, 2017 · 1 comment
Assignees
Labels
Milestone

Comments

@Azenet
Copy link

@Azenet Azenet commented May 17, 2017

Expected Behavior

A widget created with the "Add count to dashboard" button in a search result should work

Current Behavior

The widget is never refreshed and /api/dashboards/id/widgets/wid/value replies with a 500 error and the following message:

{"message":"Unable to perform count query.\n\nrequest does not support [highlight]","details":["request does not support [highlight]"]}

No exception is logged.

Steps to Reproduce

  1. Search something
  2. Create a widget on a dashboard by clicking on "Add count to dashboard" on the sidebar
  3. Go to the dashboard
  4. Widget should show "N/A" with a red exclamation triangle

Context

I am using Graylog with a 2-node Elasticsearch cluster with Docker.
/api/dashboards/id/widgets/wid returns this for the widget:

{"id":"ac51e5ec-6b9f-449b-963c-5b6715a4fa17","description":"500 errs","type":"SEARCH_RESULT_COUNT","config":{"timerange":{"type":"relative","range":3600},"lower_is_better":true,"trend":true,"query":"ctxt_response_code:>=500"},"cache_time":10,"creator_user_id":"admin"}

Your Environment

  • Graylog Version: 2.3.0-alpha.2+f24e575
  • Elasticsearch Version: 5.4.0
  • MongoDB Version: 3.4.4
  • Operating System: Linux/Debian 8
  • Browser version: Chrome 58
@dennisoelkers dennisoelkers self-assigned this May 17, 2017
@Azenet
Copy link
Author

@Azenet Azenet commented May 17, 2017

I just got this exception. Although it was thrown while processing an alert, it seems related.

2017-05-17 16:41:17,609 ERROR: org.graylog2.alerts.AlertScanner - Skipping alert check that threw an exception.
org.graylog2.indexer.ElasticsearchException: Unable to perform count query.

request does not support [highlight]
        at org.graylog2.indexer.cluster.jest.JestUtils.specificException(JestUtils.java:101) ~[graylog.jar:?]
        at org.graylog2.indexer.cluster.jest.JestUtils.execute(JestUtils.java:65) ~[graylog.jar:?]
        at org.graylog2.indexer.cluster.jest.JestUtils.execute(JestUtils.java:70) ~[graylog.jar:?]
        at org.graylog2.indexer.searches.Searches.count(Searches.java:206) ~[graylog.jar:?]
        at org.graylog2.alerts.types.MessageCountAlertCondition.runCheck(MessageCountAlertCondition.java:178) ~[graylog.jar:?]
        at org.graylog2.alerts.types.MessageCountAlertCondition.runCheck(MessageCountAlertCondition.java:52) ~[graylog.jar:?]
        at org.graylog2.alerts.AlertScanner.checkAlertCondition(AlertScanner.java:64) ~[graylog.jar:?]
        at org.graylog2.periodical.AlertScannerThread.lambda$doRun$0(AlertScannerThread.java:63) ~[graylog.jar:?]
        at java.util.ArrayList.forEach(ArrayList.java:1249) [?:1.8.0_72-internal]
        at org.graylog2.periodical.AlertScannerThread.doRun(AlertScannerThread.java:63) [graylog.jar:?]
        at org.graylog2.plugin.periodical.Periodical.run(Periodical.java:77) [graylog.jar:?]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_72-internal]
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [?:1.8.0_72-internal]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [?:1.8.0_72-internal]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [?:1.8.0_72-internal]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_72-internal]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_72-internal]
        at java.lang.Thread.run(Thread.java:745) [?:1.8.0_72-internal]
@jalogisch jalogisch added the to-verify label May 22, 2017
@jalogisch jalogisch added this to the 2.3.0 milestone May 22, 2017
@joschi joschi added bug triaged and removed to-verify labels May 23, 2017
@joschi joschi assigned joschi and unassigned dennisoelkers May 23, 2017
joschi pushed a commit that referenced this issue May 23, 2017
Jochen Schalanda
The [Elasticsearch Count API](https://www.elastic.co/guide/en/elasticsearch/reference/5.4/search-count.html)
doesn't support "limit", "offset", and "highlight" parameters.

Older versions of Elasticsearch ignored unknown parameters but that changed in
Elasticsearch 5.x: https://www.elastic.co/guide/en/elasticsearch/reference/5.4/breaking-changes-5.0.html

Fixes #3841
@ghost ghost added the in progress label May 23, 2017
dennisoelkers added a commit that referenced this issue May 24, 2017
* Fix parameters for count query in Searches#count()

The [Elasticsearch Count API](https://www.elastic.co/guide/en/elasticsearch/reference/5.4/search-count.html)
doesn't support "limit", "offset", and "highlight" parameters.

Older versions of Elasticsearch ignored unknown parameters but that changed in
Elasticsearch 5.x: https://www.elastic.co/guide/en/elasticsearch/reference/5.4/breaking-changes-5.0.html

Fixes #3841

* Correctly use filter parameter in Searches#count()
@ghost ghost removed the in progress label May 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.