oafp with ElasticSearch
List of examples of use of oafp with ElasticSearch.
Set environment variables to use with the examples:
export ES_URL=http://elastic.search:9200
export ES_EXTRA="--insecure"
Health
Get an overview of the cluster health
curl -s "$ES_URL/_cat/health?format=json" $ES_EXTRA | oafp out=ctable
Get indices overview
curl -s "$ES_URL/_cat/indices?format=json&bytes=b" $ES_EXTRA | oafp sql="select * order by index" out=ctable
Get cluster nodes overview
curl -s "$ES_URL/_cat/nodes?format=json" $ES_EXTRA | oafp sql="select * order by ip" out=ctable
Get per host data allocation
curl -s "$ES_URL/_cat/allocation?format=json&bytes=b" $ES_EXTRA | oafp sql="select * order by host" out=ctable
Get current cluster settings flat
curl -s "$ES_URL/_cluster/settings?include_defaults=true&flat_settings=true" $ES_EXTRA | oafp out=ctree
Get current cluster settings non-flatted
curl -s "$ES_URL/_cluster/settings?include_defaults=true" $ES_EXTRA | oafp out=ctree
Get stats per node
curl -s "$ES_URL/_nodes/stats/indices/search" $ES_EXTRA | oafp out=ctree
Index related
Get the settings for a specific index
curl -s "$ES_URL/kibana_sample_data_flights/_settings" $ES_EXTRA | oafp out=ctree
Get count per index
curl -s "$ES_URL/kibana_sample_data_flights/_count" $ES_EXTRA | oafp