11 2023 档案
摘要:命令样例如下: curl -X GET "https://localhost:9200/_tasks?pretty" --cacert $ES_HOME/config/certs/http_ca.crt -u "elastic:ohCxPH=QBE+s5=*lo7F9" 执行结果的样例,如下: {
阅读全文
摘要:使用本方法,可以触发强制合并操作。 默认情况下,ElasticSearch会在后台周期性触发合并操作,因此不需要用户刻意使用本方法。 使用强制合并的弊端: 可能会产生大于5G的segment对象,而ElasticSearch后台自动触发的合并操作会跳过此类大型segment对象。 假如定期执行强制合
阅读全文
摘要:Elasticsearch的shard,即对应Lucene的index。 Lucene的index由多个segment组成。 segment是index保存数据的最小单位,不支持修改。 Elasticsearch在运行过程中,启动后台任务,周期性检测并将占用空间小的segment自动合并至大一些的s
阅读全文
摘要:命令样例如下: curl -X GET "https://localhost:9200/_cat/transforms?v=true&format=json" --cacert $ES_HOME/config/certs/http_ca.crt -u "elastic:ohCxPH=QBE+s5=*
阅读全文
摘要:命令样例如下: curl -X GET "https://localhost:9200/_cat/ml/trained_models?v=true&pretty" --cacert $ES_HOME/config/certs/http_ca.crt -u "elastic:ohCxPH=QBE+s5
阅读全文
摘要:相关参数 indices.query.bool.max_clause_count 本参数当前已失效。 search.max_buckets 本参数用于控制在单个响应中返回的聚合的桶的数量。 默认值为65536。 本参数允许在elasticsearch.yml中配置,配置样例如下: search.ma
阅读全文
摘要:命令样例如下: curl -X GET "https://localhost:9200/_cat/thread_pool?v=true&pretty" --cacert $ES_HOME/config/certs/http_ca.crt -u "elastic:ohCxPH=QBE+s5=*lo7F
阅读全文
摘要:命令样例如下: curl -X GET "https://localhost:9200/_cat/templates?v=true&pretty" --cacert $ES_HOME/config/certs/http_ca.crt -u "elastic:ohCxPH=QBE+s5=*lo7F9"
阅读全文
摘要:命令样例如下: curl -X GET "https://localhost:9200/_cat/tasks?v=true&pretty" --cacert $ES_HOME/config/certs/http_ca.crt -u "elastic:ohCxPH=QBE+s5=*lo7F9" 执行结
阅读全文
摘要:命令样例如下: curl -X GET "https://localhost:9200/_cat/shards?v=true&pretty" --cacert $ES_HOME/config/certs/http_ca.crt -u "elastic:ohCxPH=QBE+s5=*lo7F9" 执行
阅读全文
摘要:命令样例如下: curl -X GET "https://localhost:9200/_cat/segments?v=true&pretty" --cacert $ES_HOME/config/certs/http_ca.crt -u "elastic:ohCxPH=QBE+s5=*lo7F9"
阅读全文
摘要:命令样例如下: curl -X GET "https://localhost:9200/_cat/repositories?v=true&pretty" --cacert $ES_HOME/config/certs/http_ca.crt -u "elastic:ohCxPH=QBE+s5=*lo7
阅读全文
摘要:命令样例如下: curl -X GET "https://localhost:9200/_cat/recovery?v=true&pretty" --cacert $ES_HOME/config/certs/http_ca.crt -u "elastic:ohCxPH=QBE+s5=*lo7F9"
阅读全文
摘要:命令样例如下: curl -X GET "https://localhost:9200/_cat/plugins?v=true&pretty" --cacert $ES_HOME/config/certs/http_ca.crt -u "elastic:ohCxPH=QBE+s5=*lo7F9" 执
阅读全文
摘要:命令样例如下: curl -X GET "https://localhost:9200/_cat/pending_tasks?v=true&pretty" --cacert $ES_HOME/config/certs/http_ca.crt -u "elastic:ohCxPH=QBE+s5=*lo
阅读全文
摘要:命令样例如下: curl -X GET "https://localhost:9200/_cat/nodes?v=true&pretty" --cacert $ES_HOME/config/certs/http_ca.crt -u "elastic:ohCxPH=QBE+s5=*lo7F9" 执行结
阅读全文
摘要:ElasticSearch节点可用的CPU核的数量,通常可以交给ElasticSearch来自行检测和判定,另外可以在``elasticsearch.yml`中显式指定。样例如下: node.processors: 2 如下表格中的processors即CPU核的数量。 线程池的列表 线程池名称 类
阅读全文
摘要:命令样例如下: curl -X GET "https://localhost:9200/_cat/nodeattrs?v=true&pretty" --cacert $ES_HOME/config/certs/http_ca.crt -u "elastic:ohCxPH=QBE+s5=*lo7F9"
阅读全文
摘要:命令样例如下: curl -X GET "https://localhost:9200/_cat/master?v=true&pretty" --cacert $ES_HOME/config/certs/http_ca.crt -u "elastic:ohCxPH=QBE+s5=*lo7F9" 执行
阅读全文
摘要:命令样例如下: curl -X GET "https://localhost:9200/_cat/indices?v=true&pretty" --cacert $ES_HOME/config/certs/http_ca.crt -u "elastic:ohCxPH=QBE+s5=*lo7F9" 执
阅读全文
摘要:命令样例如下: curl -X GET "https://localhost:9200/_cat/health?v=true&pretty" --cacert $ES_HOME/config/certs/http_ca.crt -u "elastic:ohCxPH=QBE+s5=*lo7F9" 执行
阅读全文
摘要:命令样例如下: 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"
阅读全文
摘要:命令样例如下: 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
阅读全文
摘要:ElasticSearch在运行过程中,涉及多种线程池、线程的使用,因此而需要给予足够的线程资源,保证ElasticSearch在需要时可以正常创建出线程。 查看Linux系统当前用户允许创建的线程的数量,命令如下: ulimit -a 执行结果的样例,如下: core file size (blo
阅读全文
摘要:ElasticSearch在运行过程中,涉及大量文件的打开、关闭、读、写等操作。因此当ElasticSearch进程的文件描述符数量不足时可能导致丢失数据等故障现象。 因此为保障ElasticSearch正常运行,需保证ElasticSearch可以使用至少65535个文件描述符。 查看Linux系
阅读全文
摘要:查看当前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
阅读全文
摘要:操作系统将进程加载至内存中执行时,对于当前未使用到的内存页,可能会将相关内存页交换至硬盘上,即swap。 对于性能敏感、时延敏感的应用程序比如ElasticSearch,swap特性会明显影响性能和稳定性,因此最好禁用swap特性。 对于Linux环境,目前有如下手段可以禁用swap特性。 临时关闭
阅读全文
摘要:命令样例如下: 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=
阅读全文
摘要:读取当前存储的记录的数量。 命令样例如下: curl -X GET "https://localhost:9200/_cat/count?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/component_templates?v=true&pretty" --cacert $ES_HOME/config/certs/http_ca.crt -u "elastic:ohCxPH=QBE+
阅读全文
摘要: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
阅读全文
摘要:查看各节点上各个shard的硬件使用情况,命令样例如下: curl -X GET "https://localhost:9200/_cat/allocation?v=true&pretty" --cacert $ES_HOME/config/certs/http_ca.crt -u "elastic
阅读全文
摘要:ElasticSearch之系统关键配置 集群名称 在配置文件$ES_HOME/config/elasticsearch.yml中指定,样例如下: cluster: name: logging-prod 或者 cluster.name: logging-prod 节点的名称 在配置文件$ES_HOM
阅读全文
摘要:查看当前集群中各节点的信息,执行如下命令: curl -X GET "https://localhost:9200/_nodes?pretty" --cacert $ES_HOME/config/certs/http_ca.crt -u "elastic:ohCxPH=QBE+s5=*lo7F9"
阅读全文
摘要:查看当前集群全部健康指标的信息,执行如下命令: curl -X GET "https://localhost:9200/_health_report?pretty" --cacert $ES_HOME/config/certs/http_ca.crt -u "elastic:ohCxPH=QBE+s
阅读全文
摘要:执行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=*
阅读全文
摘要:ElasticSearch默认情况下使用Log4j2来记录日志,日志配置文件的路径为$ES_HOME/config/log4j2.properties,配置方法见Log4j2的官方文档。 参考path-settings,通过指定path.logs,可以指定日志文件的保存路径。 在日志配置文件$ES_
阅读全文
摘要:参考Cluster health API。 命令样例,如下: curl -X GET "https://localhost:9200/_cluster/health?wait_for_status=yellow&timeout=50s&pretty" --cacert $ES_HOME/config
阅读全文
摘要:参考Cluster get settings API。 命令样例,不指定参数,如下: curl -X GET "https://localhost:9200/_cluster/settings?pretty" --cacert $ES_HOME/config/certs/http_ca.crt -u
阅读全文
摘要:参照Installing Elasticsearch,完成验证集群的部署。 操作步骤 下载软件包和摘要文件。 wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-8.11.1-linux-x86_64.tar
阅读全文
摘要:关键文件 memory.limit_in_bytes memory.soft_limit_in_bytes memory.memsw.limit_in_bytes tasks cgroup.procs 相关资料 Memory Resource Controller Resource Manageme
阅读全文
摘要:关键文件 cpu子系统中的关键文件。 cpu.cfs_period_us cpu.cfs_quota_us tasks cgroup.procs 常用命令 查看当前系统内的CPU。 lscpu 查看当前系统内的CPU。 cat /proc/cpuinfo 查看当前的子系统。 lssubsys -a
阅读全文
摘要:近期在准备特性的设计文档,按照评审专家的建议,需要排查现有产品中算力资源比如CPU、内存的分配方案,确认现有的硬件款型是否具备充足的资源来启用本特性。 依据前辈提供的建议,检查了产品的部署脚本,发现当前使用cgroup来实施内存的配额管理。 在家里的机器上尝试cgroup时,发现需要安装相关的软件包
阅读全文