Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Observing Elasticsearch calls (Linux only)

Info
titleCompatibility

Currently, this section is only tested on Linux workstations.  It probably won't work on Mac since docker works differently there. FIXME!

...

Code Block
languagetext
titletcpflow example output
root@thinkpad:~# tcpflow -i vethe8d3316 -e all -p -c port 9200
172.019.000.012.49054-172.019.000.004.09200: POST //content/comment_thread/5b994297219038008f000003/_update HTTP/1.1
User-Agent: Faraday v0.12.1
Accept-Encoding: gzip;q=1.0,deflate;q=0.6,identity;q=0.3
Accept: */*
Connection: close
Host: edx.devstack.elasticsearch:9200
Content-Length: 51
Content-Type: application/x-www-form-urlencoded


172.019.000.012.49054-172.019.000.004.09200: {"doc":{"last_activity_at":"2018-09-13T19:14:42Z"}}
172.019.000.004.09200-172.019.000.012.49054: HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
Content-Length: 92

{"_index":"content","_type":"comment_thread","_id":"5b994297219038008f000003","_version":15}

Sending Elasticsearch API calls

You may want to send ES API calls directly via curl.  For example, you may want to search the database to validate the effects of a code change.  Here is how you would search for all forum comments from a particular user:

...