Graylog2 / graylog2-server

Free and open log management
https://www.graylog.org
Other
7.4k stars 1.07k forks source link

ES Cluster health not shown correctly #10869

Open janheise opened 3 years ago

janheise commented 3 years ago

Expected Behavior

I expect that the ES Cluster health changes when I stop ES in the backround. ES

Current Behavior

I stop the ES instances in docker (see the attached docker-file) in the background until none is left but the health status in graylog never changes.

Possible Solution

Steps to Reproduce (for bugs)

  1. use the docker config to start graylog/es/mongo
  2. use docker ps to get the id's of the ES instances
  3. docker stop
  4. check the GUI for the health status of ES

docker-compose.txt

Context

Your Environment

luk-kaminski commented 2 years ago

Seems like back-end. Probably "indicesExist()" method called outside of try-catch block in ClusterAdapters. Will try to have a look tomorrow.

luk-kaminski commented 2 years ago

While some minor changes have been made to BE in #12233 PR, the main job needs to be done in FE. It has to react properly when "{"type":"ApiError","message":"Couldn't read Elasticsearch cluster health"}" response is returned from "api/system/indexer/cluster/health" call.

todvora commented 2 years ago

image

This is the current state of FE after the BE fix from @luk-kaminski. In the FE we need to catch the error and display a proper error message.