ransport.ssl.enabled: true
10.2 执行设置用户名和密码的命令,这里需要为4个用户分别设置密码,elastic, kibana, logstash_system,beats_system
cd /usr/share/elasticsearch/bin
./elasticsearch-setup-passwords interactive
10.3设置密码
Initiating the setup of passwords for reserved users elastic,kibana,logstash_system,beats_system.
You will be prompted to enter passwords as the process progresses.
Please confirm that you would like to continue [y/N]y
Enter password for [elastic]:
passwords must be at least [6] characters long
Try again.
Enter password for [elastic]:
Reenter password for [elastic]:
Passwords do not match.
Try again.
Enter password for [elastic]:
Reenter password for [elastic]:
Enter password for [kibana]:
Reenter password for [kibana]:
Enter password for [logstash_system]:
Reenter password for [logstash_system]:
Enter password for [beats_system]:
Reenter password for [beats_system]:
Changed password for user [kibana]
Changed password for user [logstash_system]
Changed password for user [beats_system]
Changed password for user [elastic]
10.4 修改密码
curl -H "Content-Type:application/json" -XPOST -u elastic 'http://127.0.0.1:9200/_xpack/security/user/elastic/_password' -d '{ "password" : "123456" }'
11.Elasticsearch 默认查询结果最多展示前 10000 条数据。
【方式一】(修改完配置文件,需要重启集群中的 ES 服务)
修改Elasticsearch 集群中的 配置文件 config/elasticsearch.yml
在配置文件最后增加一行,如下:
max_result_window: 200000000
【方式二】(推荐)
具体操作命令,如下(比如,设置可查询 200000000 条数据,其中 alarm 是index名称):
PUT alarm/_settings
{
"max_result_window" : 200000000
}