ElasticHQ / elasticsearch-HQ

Monitoring and Management Web Application for ElasticSearch instances and clusters.
http://www.elastichq.org
Other
4.96k stars 530 forks source link

Broken Nodes Summary API #493

Closed maciej-p closed 4 years ago

maciej-p commented 4 years ago

General information

Issue Description

Nodes Summary API is broken and Nodes summary on main page not showing nodes. https://docs.elastichq.org/rest-api.html#nodes-summary

Source Code / Logs

Broken in: royrusso - Fix for node roles in ES v7. df73e57 on 15 Apr This change:

- def get_node_summary(self, cluster_name, node_ids=None):
+ def get_node_summary(self, cluster_name):

curl http://127.0.0.1:5000/api/nodes/ES/_summary -v About to connect() to 127.0.0.1 port 5000 (#0) Trying 127.0.0.1... Connected to 127.0.0.1 (127.0.0.1) port 5000 (#0)

GET /api/nodes/ES/_summary HTTP/1.1 User-Agent: curl/7.29.0 Host: 127.0.0.1:5000 Accept: /

< HTTP/1.1 500 INTERNAL SERVER ERROR < Server: gunicorn/19.7.1 < Date: Fri, 27 Sep 2019 11:08:02 GMT < Connection: keep-alive < Content-Type: application/json < Status: 500 < X-HQ-Response-Time: 1 < Access-Control-Allow-Origin: * < Access-Control-Allow-Credentials: true < Access-Control-Allow-Methods: POST, OPTIONS, GET, PUT, DELETE < Allow: POST, GET, PUT, DELETE < Access-Control-Max-Age: 3600 < Content-Length: 72 < { "message": "Oops! Something bad happened.", "status_code": 500 } Connection #0 to host 127.0.0.1 left intact

Sep 27 05:49:37 elastichq docker[64994]: [2019-09-27 10:49:37,317] ERROR in exceptions: Oops! Something bad happened. Sep 27 05:49:37 elastichq docker[64994]: Traceback (most recent call last): Sep 27 05:49:37 elastichq docker[64994]: File "/src/elastichq/common/exceptions.py", line 29, in _request_wrapper Sep 27 05:49:37 elastichq docker[64994]: return functor(*args, **kwargs) Sep 27 05:49:37 elastichq docker[64994]: File "/src/elastichq/api/nodes.py", line 20, in get Sep 27 05:49:37 elastichq docker[64994]: response = NodeService().get_node_summary(cluster_name, node_ids) Sep 27 05:49:37 elastichq docker[64994]: TypeError: get_node_summary() takes 2 positional arguments but 3 were given