elasticsearch 相关(ELK)
windows环境
els版本是7.12.0,下载地址
https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.12.0-windows-x86_64.zip
kibana 7.12.0
https://artifacts.elastic.co/downloads/kibana/kibana-7.12.0-windows-x86_64.zip
logstash 7.12.0
https://artifacts.elastic.co/downloads/logstash/logstash-7.12.0-windows-x86_64.zip
下载解压后修改config文件下elaticsearch.yml
新增,用于远程连接的配置
xpack.ml.enabled: false
network.host: 0.0.0.0
http.port: 9200
transport.host: localhost
transport.tcp.port: 9300
之后bin目录管理员运行elaticsearch.bat
云服务器开放端口9200后访问
主机地址:9200即可访问els
图形界面显示推荐使用 chrome插件安装
https://chrome.google.com/webstore/detail/elasticsearch-head/ffmkiejjmecolpfloofpjologoblkegm
添加即可
IDEA pom.xml导入依赖,注意对应版本,例如我els版本是7.12.0,pom文件中version也要与之对应
<!-- elasticsearch 相关--> <!--jpa 支持--> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-jpa</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-elasticsearch</artifactId> <version>2.1.7.RELEASE</version> </dependency> <dependency> <groupId>org.elasticsearch.client</groupId> <artifactId>transport</artifactId> <version>7.12.0</version> </dependency> <dependency> <groupId>org.elasticsearch</groupId> <artifactId>elasticsearch</artifactId> <version>7.12.0</version> </dependency> <!-- elasticsearch 相关-->
kibana添加es数据
参考博客
https://blog.csdn.net/liuming690452074/article/details/120106397
logstash需要jruby的jar包
logstash里面的config目录下 logstash-simple.conf复制当前目录重命名为logstash.conf
logstash启动命令行
logstash -e "input { stdin { } } output { elasticsearch { hosts => localhost } }"
--未完待续--