curl -XGET ''
-
{
-
"cluster_name" : "elasticsearch",
-
"status" : "green",
-
"timed_out" : false,
-
"number_of_nodes" : 2,
-
"number_of_data_nodes" : 2,
-
"active_primary_shards" : 21,
-
"active_shards" : 42,
-
"relocating_shards" : 0,
-
"initializing_shards" : 0,
-
"unassigned_shards" : 0
-
}
三种状态:green
, yellow
or red,
green是最佳状态
详细:
http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/cluster-health.html
curl -XGET ''
curl -XGET ''
-
{
-
"timestamp" : 1425287509927,
-
"cluster_name" : "elasticsearch",
-
"status" : "green",
-
"indices" : {
-
"count" : 5,
-
"shards" : {
-
"total" : 42,
-
"primaries" : 21,
-
"replication" : 1.0,
-
"index" : {
-
"shards" : {
-
"min" : 2,
-
"max" : 10,
-
"avg" : 8.4
-
},
-
"primaries" : {
-
"min" : 1,
-
"max" : 5,
-
"avg" : 4.2
-
},
-
"replication" : {
-
"min" : 1.0,
-
"max" : 1.0,
-
"avg" : 1.0
-
}
-
}
-
},
-
"docs" : {
-
"count" : 3480946,
-
"deleted" : 0
-
},
-
"store" : {
-
"size" : "2.4gb",
-
"size_in_bytes" : 2620079375,
-
"throttle_time" : "42.1s",
-
"throttle_time_in_millis" : 42110
-
},
-
"fielddata" : {
-
"memory_size" : "14.4mb",
-
"memory_size_in_bytes" : 15127000,
-
"evictions" : 0
-
},
-
"filter_cache" : {
-
"memory_size" : "8.3mb",
-
"memory_size_in_bytes" : 8737648,
-
"evictions" : 0
-
},
-
"id_cache" : {
-
"memory_size" : "0b",
-
"memory_size_in_bytes" : 0
-
},
-
"completion" : {
-
"size" : "0b",
-
"size_in_bytes" : 0
-
},
-
"segments" : {
-
"count" : 302,
-
"memory" : "15.8mb",
-
"memory_in_bytes" : 16608228,
-
"index_writer_memory" : "745kb",
-
"index_writer_memory_in_bytes" : 762964,
-
"index_writer_max_memory" : "215.3mb",
-
"index_writer_max_memory_in_bytes" : 225810835,
-
"version_map_memory" : "20.7kb",
-
"version_map_memory_in_bytes" : 21248,
-
"fixed_bit_set" : "0b",
-
"fixed_bit_set_memory_in_bytes" : 0
-
},
-
"percolate" : {
-
"total" : 0,
-
"get_time" : "0s",
-
"time_in_millis" : 0,
-
"current" : 0,
-
"memory_size_in_bytes" : -1,
-
"memory_size" : "-1b",
-
"queries" : 0
-
}
-
},
-
"nodes" : {
-
"count" : {
-
"total" : 2,
-
"master_only" : 0,
-
"data_only" : 0,
-
"master_data" : 2,
-
"client" : 0
-
},
-
"versions" : [ "1.4.4" ],
-
"os" : {
-
"available_processors" : 10,
-
"mem" : {
-
"total" : "17.5gb",
-
"total_in_bytes" : 18815172608
-
},
-
"cpu" : [ {
-
"vendor" : "Intel",
-
"model" : "Xeon",
-
"mhz" : 2132,
-
"total_cores" : 2,
-
"total_sockets" : 1,
-
"cores_per_socket" : 2,
-
"cache_size" : "4kb",
-
"cache_size_in_bytes" : 4096,
-
"count" : 2
-
} ]
-
},
-
"process" : {
-
"cpu" : {
-
"percent" : 51
-
},
-
"open_file_descriptors" : {
-
"min" : 569,
-
"max" : 658,
-
"avg" : 613
-
}
-
},
-
"jvm" : {
-
"max_uptime" : "1.1h",
-
"max_uptime_in_millis" : 4113718,
-
"versions" : [ {
-
"version" : "1.7.0_71",
-
"vm_name" : "Java HotSpot(TM) 64-Bit Server VM",
-
"vm_version" : "24.71-b01",
-
"vm_vendor" : "Oracle Corporation",
-
"count" : 2
-
} ],
-
"mem" : {
-
"heap_used" : "333.6mb",
-
"heap_used_in_bytes" : 349883472,
-
"heap_max" : "1.9gb",
-
"heap_max_in_bytes" : 2094268416
-
},
-
"threads" : 164
-
},
-
"fs" : {
-
"total" : "394.3gb",
-
"total_in_bytes" : 423468793856,
-
"free" : "357.1gb",
-
"free_in_bytes" : 383441518592,
-
"available" : "337gb",
-
"available_in_bytes" : 361930506240,
-
"disk_reads" : 247722,
-
"disk_writes" : 7457226,
-
"disk_io_op" : 7704948,
-
"disk_read_size" : "6.6gb",
-
"disk_read_size_in_bytes" : 7187396608,
-
"disk_write_size" : "287.7gb",
-
"disk_write_size_in_bytes" : 308939509760,
-
"disk_io_size" : "294.4gb",
-
"disk_io_size_in_bytes" : 316126906368,
-
"disk_queue" : "0",
-
"disk_service_time" : "4.2"
-
},
-
"plugins" : [ {
-
"name" : "analysis-ik",
-
"version" : "${project.version}",
-
"description" : "ik analysis",
-
"jvm" : true,
-
"site" : false
-
} ]
-
}
-
}
详细:
http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/cluster-state.html
http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/cluster-stats.html
curl -XGET ''
curl -XGET ''
-
{
-
"cluster_name" : "elasticsearch",
-
"nodes" : {
-
"ix5k_7JEQLGlKzIWCRgeEg" : {
-
"timestamp" : 1425288033283,
-
"name" : "Maxam",
-
"transport_address" : "inet[/192.168.167.1:9300]",
-
"host" : "host1",
-
"ip" : [ "inet[/192.168.167.1:9300]", "NONE" ],
-
"os" : {
-
"timestamp" : 1425288033283,
-
"uptime_in_millis" : 5380471,
-
"load_average" : [ 0.28, 0.43, 0.43 ],
-
"cpu" : {
-
"sys" : 2,
-
"user" : 20,
-
"idle" : 77,
-
"usage" : 22,
-
"stolen" : 0
-
},
-
"mem" : {
-
"free_in_bytes" : 92459008,
-
"used_in_bytes" : 2011693056,
-
"free_percent" : 34,
-
"used_percent" : 65,
-
"actual_free_in_bytes" : 721952768,
-
"actual_used_in_bytes" : 1382199296
-
},
-
"swap" : {
-
"used_in_bytes" : 158756864,
-
"free_in_bytes" : 4136202240
-
}
-
},
-
"process" : {
-
"timestamp" : 1425288033284,
-
"open_file_descriptors" : 557,
-
"cpu" : {
-
"percent" : 26,
-
"sys_in_millis" : 108140,
-
"user_in_millis" : 1093120,
-
"total_in_millis" : 1201260
-
},
-
"mem" : {
-
"resident_in_bytes" : 439296000,
-
"share_in_bytes" : 13516800,
-
"total_virtual_in_bytes" : 2728906752
-
}
-
}
-
},
-
"SKk2NEreQ2GiTnm_U176Wg" : {
-
"timestamp" : 1425288078666,
-
"name" : "Vindaloo",
-
"transport_address" : "inet[/192.168.167.2:9300]",
-
"host" : "host2",
-
"ip" : [ "inet[/192.168.167.2:9300]", "NONE" ],
-
"os" : {
-
"timestamp" : 1425288078666,
-
"uptime_in_millis" : 5685033,
-
"load_average" : [ 0.04, 0.21, 0.17 ],
-
"cpu" : {
-
"sys" : 0,
-
"user" : 2,
-
"idle" : 96,
-
"usage" : 2,
-
"stolen" : 0
-
},
-
"mem" : {
-
"free_in_bytes" : 7614054400,
-
"used_in_bytes" : 9096966144,
-
"free_percent" : 80,
-
"used_percent" : 19,
-
"actual_free_in_bytes" : 13409837056,
-
"actual_used_in_bytes" : 3301183488
-
},
-
"swap" : {
-
"used_in_bytes" : 0,
-
"free_in_bytes" : 8589926400
-
}
-
},
-
"process" : {
-
"timestamp" : 1425288078667,
-
"open_file_descriptors" : 660,
-
"cpu" : {
-
"percent" : 23,
-
"sys_in_millis" : 98870,
-
"user_in_millis" : 1269750,
-
"total_in_millis" : 1368620
-
},
-
"mem" : {
-
"resident_in_bytes" : 497192960,
-
"share_in_bytes" : 17502208,
-
"total_virtual_in_bytes" : 5988392960
-
}
-
}
-
}
-
}
-
}
curl -XGET ''
curl -XGET ''
curl -XGET ''
curl -XGET ''
详细:
http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/cluster-nodes-stats.html
http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/cluster-nodes-info.html
curl -XGET 'localhost:9200/_nodes/_local?pretty'
curl -XGET 'localhost:9200/_nodes/_local/network?pretty'
-
{
-
"cluster_name" : "elasticsearch",
-
"nodes" : {
-
"ix5k_7JEQLGlKzIWCRgeEg" : {
-
"name" : "Maxam",
-
"transport_address" : "inet[/192.168.167.1:9300]",
-
"host" : "host1",
-
"ip" : "192.168.167.1",
-
"version" : "1.4.4",
-
"build" : "c88f77f",
-
"http_address" : "inet[/192.168.167.1:9200]",
-
"network" : {
-
"refresh_interval_in_millis" : 5000,
-
"primary_interface" : {
-
"address" : "192.168.167.1",
-
"name" : "bond0",
-
"mac_address" : "00:56:50:94:63:12"
-
}
-
}
-
}
-
}
-
}
以上所有查询都可以针对json节点的子节点进行查询,关键词如:settings
, os
, process
, jvm
, thread_pool
, network
, transport
, http
, plugins
例如:
curl -XGET ''
curl -XGET ''
curl -XGET ''
curl -XGET ''
阅读(18637) | 评论(0) | 转发(0) |