合集-ElasticSearch
摘要:参照Installing Elasticsearch,完成验证集群的部署。 操作步骤 下载软件包和摘要文件。 wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-8.11.1-linux-x86_64.tar
阅读全文
摘要:参考Cluster get settings API。 命令样例,不指定参数,如下: curl -X GET "https://localhost:9200/_cluster/settings?pretty" --cacert $ES_HOME/config/certs/http_ca.crt -u
阅读全文
摘要:参考Cluster health API。 命令样例,如下: curl -X GET "https://localhost:9200/_cluster/health?wait_for_status=yellow&timeout=50s&pretty" --cacert $ES_HOME/config
阅读全文
摘要:ElasticSearch默认情况下使用Log4j2来记录日志,日志配置文件的路径为$ES_HOME/config/log4j2.properties,配置方法见Log4j2的官方文档。 参考path-settings,通过指定path.logs,可以指定日志文件的保存路径。 在日志配置文件$ES_
阅读全文
摘要:执行aliases命令,如下: curl -X GET "https://localhost:9200/_cat/aliases?pretty&v=true" --cacert $ES_HOME/config/certs/http_ca.crt -u "elastic:ohCxPH=QBE+s5=*
阅读全文
摘要:查看当前集群全部健康指标的信息,执行如下命令: curl -X GET "https://localhost:9200/_health_report?pretty" --cacert $ES_HOME/config/certs/http_ca.crt -u "elastic:ohCxPH=QBE+s
阅读全文
摘要:查看当前集群中各节点的信息,执行如下命令: curl -X GET "https://localhost:9200/_nodes?pretty" --cacert $ES_HOME/config/certs/http_ca.crt -u "elastic:ohCxPH=QBE+s5=*lo7F9"
阅读全文
摘要:ElasticSearch之系统关键配置 集群名称 在配置文件$ES_HOME/config/elasticsearch.yml中指定,样例如下: cluster: name: logging-prod 或者 cluster.name: logging-prod 节点的名称 在配置文件$ES_HOM
阅读全文
摘要:查看各节点上各个shard的硬件使用情况,命令样例如下: curl -X GET "https://localhost:9200/_cat/allocation?v=true&pretty" --cacert $ES_HOME/config/certs/http_ca.crt -u "elastic
阅读全文
摘要:curl -X GET "https://localhost:9200/_cat/ml/anomaly_detectors?v=true&pretty" --cacert $ES_HOME/config/certs/http_ca.crt -u "elastic:ohCxPH=QBE+s5=*lo7
阅读全文
摘要:命令样例如下: curl -X GET "https://localhost:9200/_cat/component_templates?v=true&pretty" --cacert $ES_HOME/config/certs/http_ca.crt -u "elastic:ohCxPH=QBE+
阅读全文
摘要:ElasticSearch主要的配置文件,如下: elasticsearch.yml,ElasticSearch的相关参数。 jvm.options,JVM的相关参数。 log4j2.properties,日志的相关参数。 默认情况下,ElasticSearch从$ES_HOME/config目录下
阅读全文
摘要:读取当前存储的记录的数量。 命令样例如下: curl -X GET "https://localhost:9200/_cat/count?v=true&pretty" --cacert $ES_HOME/config/certs/http_ca.crt -u "elastic:ohCxPH=QBE+
阅读全文
摘要:命令样例如下: curl -X GET "https://localhost:9200/_cat/ml/data_frame/analytics?v=true&pretty" --cacert $ES_HOME/config/certs/http_ca.crt -u "elastic:ohCxPH=
阅读全文
摘要:操作系统将进程加载至内存中执行时,对于当前未使用到的内存页,可能会将相关内存页交换至硬盘上,即swap。 对于性能敏感、时延敏感的应用程序比如ElasticSearch,swap特性会明显影响性能和稳定性,因此最好禁用swap特性。 对于Linux环境,目前有如下手段可以禁用swap特性。 临时关闭
阅读全文
摘要:查看当前Linux系统中vm.max_map_count变量的值,命令如下: sysctl vm.max_map_count 执行结果的样例,如下: vm.max_map_count = 65530 修改参数vm.max_map_count的值,命令如下 sysctl -w vm.max_map_c
阅读全文
摘要:ElasticSearch在运行过程中,涉及大量文件的打开、关闭、读、写等操作。因此当ElasticSearch进程的文件描述符数量不足时可能导致丢失数据等故障现象。 因此为保障ElasticSearch正常运行,需保证ElasticSearch可以使用至少65535个文件描述符。 查看Linux系
阅读全文
摘要:ElasticSearch在运行过程中,涉及多种线程池、线程的使用,因此而需要给予足够的线程资源,保证ElasticSearch在需要时可以正常创建出线程。 查看Linux系统当前用户允许创建的线程的数量,命令如下: ulimit -a 执行结果的样例,如下: core file size (blo
阅读全文
摘要:命令样例如下: curl -X GET "https://localhost:9200/_cat/ml/datafeeds?v=true&pretty" --cacert $ES_HOME/config/certs/http_ca.crt -u "elastic:ohCxPH=QBE+s5=*lo7
阅读全文
摘要:命令样例如下: curl -X GET "https://localhost:9200/_cat/fielddata?v=true&pretty" --cacert $ES_HOME/config/certs/http_ca.crt -u "elastic:ohCxPH=QBE+s5=*lo7F9"
阅读全文