Skip to content

Instantly share code, notes, and snippets.

@palashkulsh
Last active May 19, 2018 11:59
Show Gist options
  • Save palashkulsh/051779a1ed705245f49a83793a433697 to your computer and use it in GitHub Desktop.
Save palashkulsh/051779a1ed705245f49a83793a433697 to your computer and use it in GitHub Desktop.
elasticsearch monitoring script
echo -e "\\n\"start,name,qry_rtio,http_opn,srch_rej,bulk_rej,heap_usd_pcnt,heap_cmmt_diff,old_gc_count,ld1,fd_evic,disk_q,disk_time,net_out2_retrans_ratio,net_in2_err_ratio,end\"" && curl -s -XGET localhost:9200/_nodes/stats?pretty | jq '.nodes[] | "start\",\(.name),\(.indices.search.query_time_in_millis/(.indices.search.query_total+1)|floor),\(.http.total_opened),\(.thread_pool.search.rejected),\(.thread_pool.bulk.rejected),\(.jvm.mem | .heap_used_percent),\(.jvm.mem|.heap_committed_in_bytes - .heap_max_in_bytes),\(.jvm.gc.collectors.old.collection_count),\(.os.load_average[1]),\(.indices.fielddata.evictions),\(.fs.total.disk_queue),\(.fs.total.disk_service_time),\((.network.tcp.retrans_segs /.network.tcp.out_segs)*100|floor),\((.network.tcp.in_errs / .network.tcp.in_segs)*100|floor),\"end"' | column -t -s,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment