4

We are using elastic search in our store but I am not convinced that all the results are served from elastic search. Is there a tool/feature where we can monitor activity in elastic search server just like MONITOR on redis-cli, or access logs on apache?

We are using the Magento commerce cloud, but I would be open to tools not provided in commerce cloud stack as well to monitor things at least on dev machines.

EDIT :

I apologise if it wasn't clear from my examples but I want real time monitoring of requests served from elastic search to confirm that the search results are served from elastic search in my store.

1
  • That’s a good question. I have the same situation. Will try to check it. Nov 29, 2019 at 23:37

1 Answer 1

3

I think you should using magento-cloud ssh and ssh to Magento Cloud Node such as production, staging

Using CURL to check Elasticsearch result Elastic search document << here,

example: I want to get all product are belongs to Category 3

  curl -X GET 'ip:port/[index]/_search?pretty' -H 'Content-Type: application/json' -d '{
  "query": {
    "bool": {
      "must": [
        {
          "term": {
            "category_ids" : "3"
          }
        }
      ]
    }
  },
  "from": 0,
  "size": 10000
}'

How can you get list of [index] please using

curl -x GET '[ip]:[port]/_cat/indices?v'

Elasticsearch Indexes

Absolutely you are also want to know product count, please using "size": 1

You can debug into vendor/elasticsearch/elasticsearch/src/Elasticsearch/Client.php:952 to dump query params are using on your project.

Update 2:

  • You can using Elasticsearch Tool Box (Chrome Ext), connect to Cloud Server using SSH Tunnel.
6
  • How to monitor it on local? Nov 30, 2019 at 5:06
  • Please using elasticsearch-toolbox (Chrome Ext), or using terminal as I mentioned.
    – HoangHieu
    Nov 30, 2019 at 5:12
  • Updated Answer.
    – HoangHieu
    Nov 30, 2019 at 5:25
  • Thank you for your response, I will confirm this after the weekend. Nov 30, 2019 at 13:26
  • 1
    Just an FYI, if anyone needs a GUI for monitoring elasticsearch indices etc use "elasticvue" chrome extension instead. It has a lot more features and a better ui. Dec 2, 2019 at 11:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.