Kibana Docker#
Kibana gives shape to any kind of data — structured and unstructured — indexed in Elasticsearch.
Docker#
docker run -d --name elasticsearch -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" elasticsearch:7.17.4
docker run -d --name kibana -e ELASTICSEARCH_HOSTS=http://elasticsearchIP:9200 -p 5601:5601 kibana:7.17.4
Tests#
GET _cat/nodes
GET _cat/nodes?v=true
GET _cat/master?v=true
GET /_search
POST /_search
PUT /book
# 查看book索引数据
GET book/_search
# 添加一条数据
POST book/_doc
{
"page":8,
"content": "T5750喜欢运动"
}
# 更新数据
PUT book/_doc/MniDqYEBMPp1ImUSVFRj
{
"page":8,
"content":"T5750喜欢运动"
}
GET book/_search
{
"query": {
"match": {
"content": "T5750"
}
}
}
# 删除数据
POST book/_delete_by_query
{
"query": {
"match": {
"page": 8
}
}
}
# 批量插入数据
POST book/_bulk
{ "index":{} }
{ "page":22 , "content": "Adversity, steeling will strengthen body.逆境磨练意志,锻炼增强体魄。"}
{ "index":{} }
{ "page":23 , "content": "Reading is to the mind, such as exercise is to the body.读书之于头脑,好比运动之于身体。"}
{ "index":{} }
{ "page":24 , "content": "Years make you old, anti-aging.岁月催人老,运动抗衰老。"}
{ "index":{} }