ELK用户管理

1、 添加用户

# cd /data/PRG/elasticsearch
# bin/x-pack/users useradd admin -p kbsonlong -r superuser

2、查看用户

[root@kbsonlong elasticsearch]# bin/x-pack/users list
kbson          : monitoring_user
admin          : superuser
[root@kbsonlong elasticsearch]#

3、测试用户是否成功登录

[root@kbsonlong elasticsearch]# GET http://localhost:9200/_xpack/
Enter username for security at localhost:9200: admin
Password: 
{"build":{"hash":"e006fe8","date":"2016-11-24T10:19:32.318Z"},"license":{"uid":"f95af1d7-92a1-441b-8241-e0552c734b85","type":"trial","mode":"trial","status":"active","expiry_date_in_millis":1483743352122},"features":{"graph":{"description":"Graph Data Exploration for the Elastic Stack","available":true,"enabled":true},"monitoring":{"description":"Monitoring for the Elastic Stack","available":true,"enabled":true},"security":{"description":"Security for the Elastic Stack","available":true,"enabled":true},"watcher":{"description":"Alerting, Notification and Automation for the Elastic Stack","available":true,"enabled":true}},"tagline":"You know, for X"}

# curl http://localhost:9200/_xpack/ --user admin:kbsonlong
{"build":{"hash":"7763f8e","date":"2016-10-26T04:51:59.202Z"},"license":{"uid":"06a82587-66ac-4d4a-90c4-857d9ca7f3bc","type":"trial","mode":"trial","status":"active","expiry_date_in_millis":1483753731066},"features":{"graph":{"description":"Graph Data Exploration for the Elastic Stack","available":true,"enabled":true},"monitoring":{"description":"Monitoring for the Elastic Stack","available":true,"enabled":true},"security":{"description":"Security for the Elastic Stack","available":true,"enabled":true},"watcher":{"description":"Alerting, Notification and Automation for the Elastic Stack","available":true,"enabled":true}},"tagline":"You know, for X"}


4、删除用户

# /data/PRG/elasticsearch/bin/x-pack/users userdel kbson
 
# /data/PRG/elasticsearch/bin/x-pack/users list
admin          :superuser




评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值