随笔分类 - elasticsearch
摘要:若索引的数据很大的情况下,我们要删除其中的大部分的数据,这样会很耗时,我们可以尝试换另外的办法,先把需要保留的数据迁移到新的index,然后再删除原有的index,因为删除整个index是很快的操作. curl -u elastic:elastic -X POST "192.168.1.134:19
阅读全文
摘要:from elasticsearch import Elasticsearch import os, json, urllib, datetime, shutil,random,uuid import time import random from elasticsearch import help
阅读全文
摘要:curl -u elastic:elastic -X POST -H 'Content-Type: application/json' "http://192.168.1.134:19200/app_message_all/_delete_by_query?slices=3&wait_for_com
阅读全文
摘要:环境:OS:Centos 7es:6.8.5拓扑:3节点的集群 1.下载地址https://github.com/medcl/elasticsearch-analysis-ik下载的版本需要跟es的版本保持一致我这里的es版本是6.8.5的,所以下载相应版本的分词器elasticsearch-ana
阅读全文
摘要:#!/usr/bin/env python #coding=utf-8 from elasticsearch import Elasticsearch import time import random from elasticsearch import helpers ##es = Elastic
阅读全文
摘要:环境:OS:Centos 7 1.下载下载地址:https://www.elastic.co/cn/downloads/past-releases#elasticsearch 2.解压缩并创建数据目录[root@localhost soft]# tar -xvf elasticsearch-8.8.
阅读全文
摘要:环境: OS:Centos 7 1.下载下载地址https://gitcode.net/mirrors/lmenezes/cerebro?utm_source=csdn_github_accelerator 我这里下载的是cerebro-0.9.4.tgz 2.解压安装[root@host134 s
阅读全文
摘要:环境: OS:Centos 7 pmm server:版本1 ##########################################被监控ES机器安装########################### 1.查看es版本 [root@localhost ~]# curl -u ela
阅读全文
摘要:查看后台taskcurl -u elastic:xxxxx -X GET "192.168.1.103:19200/_tasks?pretty" 查看具体的task curl -u elastic:elastic -X GET "192.168.1.134:19200/_tasks/HEPkjUM_
阅读全文
摘要:ES版本:6.5.0 前置条件:ES已经安装部署好,并在运行状态 1.将备份文件解压到新服务器的备份目录备份目录有es参数决定path.repo: /home/elasticsearch/esbak[root@hxl elasticsearch]# cd /home/yeemiao/[root@hx
阅读全文
摘要:环境:OS:Centos 7ES:6.8.5 1.下载 下载地址 https://www.elastic.co/cn/downloads/past-releases#kibana注意下载的版本需要与ES的版本保持一致wget https://artifacts.elastic.co/download
阅读全文
摘要:环境: Os:Centos 7 ES:6.8.5 1.下载地址https://github.com/mobz/elasticsearch-head 我这里下载的是:elasticsearch-head-master.zip 2.解压安装将下载的安装包上传到ES服务器解压[root@hadoop-sl
阅读全文
摘要:环境: ES:6.8.5 SQL RESTFUL 创建索引curl -u hxl:123456 -XPUT 'http://192.168.1.63:19200/myindex_test' 写入测试数据curl -u hxl:123456 -H "Content-Type: application/
阅读全文
摘要:环境: OS:Centos 7 es:6.8.5 1.查看index的只读状态 -bash-4.2$ curl -u elastic:elastic -H "Content-Type: application/json" -XGET "http://192.168.1.109:19200/app_m
阅读全文
摘要:1.in查询 curl -H "Content-Type: application/json" -XPOST 'http://192.168.1.135:19200/metric_pl/_count?pretty' -d ' { "query" : { "constant_score" : { "f
阅读全文
摘要:对es数据dml操作后会产生大量的translog日志文件,默认保留是12小时的,我们可以修改这些日志的保留时间 [root@localhost 0]# du -h ./ --max-depth=1238M ./index8.0K ./_state1008.0M ./translog1246M ./
阅读全文
摘要:1.生成证书1.执行命令创建ca 执行:su - elasticsearch[elasticsearch@rac01 bin]$ cd /usr/local/services/elasticsearch/bin[elasticsearch@rac01 bin]$ ./elasticsearch-ce
阅读全文
摘要:es7.12集群部署环境:192.168.56.111192.168.56.112192.168.56.113 基础安装 系统配置 每个机器上都要执行 系统参数配置 修改limits.conf配置文件 vi /etc/security/limits.conf root用户下添加如下2两项,然后退出使
阅读全文
摘要:es集群部署环境:192.168.56.111192.168.56.112192.168.56.113 基础安装 系统修改配置 每个机器上都要执行 系统参数配置 修改limits.conf配置文件 vi /etc/security/limits.conf root用户下添加如下2两项,然后退出使用e
阅读全文