kibana可视化安装
下载
安装
# 上传安装包, 解压
tar -zxvf kibana-7.8.0-linux-x86_64.tar.gz
配置
vi config/kibana.yml
# 修改
server.port
server.host
elasticsearch.hosts
运行
# root用户
./bin/kibana --allow-root
# 非root用户
./bin/kibana
然后浏览器中打开: http://虚拟机ip:5601
kibana操作elasticsearch
### 创建索引
put /xiaodoubi
-->
{
"acknowledged" : true,
"shards_acknowledged" : true,
"index" : "xiaodoubi"
}
<--
# 查询索引
get /xiaodoubi
-->
{
"xiaodoubi" : {
"aliases" : { },
"mappings" : { },
"settings" : {
"index" : {
"creation_date" : "1593929688121",
"number_of_shards" : "1",
"number_of_replicas" : "1",
"uuid" : "K2v3pp5qRoGkY4UlUhwP1A",
"version" : {
"created" : "7080099"
},
"provided_name" : "xiaodoubi"
}
}
}
}
<--
# 创建(修改)文档 /索引/类型/id
put /xiaodoubi/user/1
{
"name":"xiaoming",
"age":23,
"sex":0
}
-->
{
"_index" : "xiaodoubi",
"_type" : "user",
"_id" : "1",
"_version" : 1,
"result" : "created",
"_shards" : {
"total" : 1,
"successful" : 1,
"failed" : 0
},
"_seq_no" : 2,
"_primary_term" : 1
}
<--
# 查询文档
get /xiaodoubi/user/1
-->
{
"_index" : "xiaodoubi",
"_type" : "user",
"_id" : "1",
"_version" : 2,
"_seq_no" : 1,
"_primary_term" : 1,
"found" : true,
"_source" : {
"name" : "xiaoming",
"age" : 23,
"sex" : 0
}
}
# 删除数据
delete /xiaodoubi/user/1
<--
修改只能修改整个文档, 而不能修改其中的某些字段