To get the slow queries in Elasticsearch, use the following command:
curl -s 'http://<hostNameorIP>:9200/_tasks?detailed&pretty' | jq '.nodes[] | .tasks[] | select(.running_time_in_nanos > 10000000000) | {task_id, action, running_time_in_nanos, description}'