在Windows10系统下部署ELK(待更新)
Posted 玛丽莲茼蒿
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了在Windows10系统下部署ELK(待更新)相关的知识,希望对你有一定的参考价值。
1. Elasticsearch部署
下载
https://www.elastic.co/cn/downloads/elasticsearch
下载后解压,注意:解压目录中不要有中文。双加bin目录下的elasticsearch.bat就能运行
进入http://localhost:9200测试是否运行成功,看到以下内容说明成功了。
但是运行过程中报了这样一个error(即便是有error也能运行)
[2022-01-06T09:50:50,430][ERROR][o.e.i.g.GeoIpDownloader ] [DESKTOP-LLMRBOI] exception during geoip databases update
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at sun.security.ssl.Alerts.getSSLException(Alerts.java:192) ~[?:?]
at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1949) ~[?:?]
at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:302) ~[?:?]
at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:296) ~[?:?]
at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1514) ~[?:?]
at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:216) ~[?:?]
at sun.security.ssl.Handshaker.processLoop(Handshaker.java:1026) ~[?:?]
at sun.security.ssl.Handshaker.process_record(Handshaker.java:961) ~[?:?]
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1062) ~[?:?]
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1375) ~[?:?]
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1403) ~[?:?]
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1387) ~[?:?]
at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:559) ~[?:?]
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185) ~[?:?]
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1546) ~[?:?]
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1474) ~[?:?]
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480) ~[?:1.8.0_131]
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:338) ~[?:?]
at org.elasticsearch.ingest.geoip.HttpClient.lambda$get$0(HttpClient.java:55) ~[ingest-geoip-7.16.2.jar:7.16.2]
at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_131]
at org.elasticsearch.ingest.geoip.HttpClient.doPrivileged(HttpClient.java:97) ~[ingest-geoip-7.16.2.jar:7.16.2]
at org.elasticsearch.ingest.geoip.HttpClient.get(HttpClient.java:49) ~[ingest-geoip-7.16.2.jar:7.16.2]
at org.elasticsearch.ingest.geoip.HttpClient.getBytes(HttpClient.java:40) ~[ingest-geoip-7.16.2.jar:7.16.2]
at org.elasticsearch.ingest.geoip.GeoIpDownloader.fetchDatabasesOverview(GeoIpDownloader.java:135) ~[ingest-geoip-7.16.2.jar:7.16.2]
at org.elasticsearch.ingest.geoip.GeoIpDownloader.updateDatabases(GeoIpDownloader.java:123) ~[ingest-geoip-7.16.2.jar:7.16.2]
at org.elasticsearch.ingest.geoip.GeoIpDownloader.runDownloader(GeoIpDownloader.java:260) [ingest-geoip-7.16.2.jar:7.16.2]
at org.elasticsearch.ingest.geoip.GeoIpDownloaderTaskExecutor.nodeOperation(GeoIpDownloaderTaskExecutor.java:97) [ingest-geoip-7.16.2.jar:7.16.2]
at org.elasticsearch.ingest.geoip.GeoIpDownloaderTaskExecutor.nodeOperation(GeoIpDownloaderTaskExecutor.java:43) [ingest-geoip-7.16.2.jar:7.16.2]
at org.elasticsearch.persistent.NodePersistentTasksExecutor$1.doRun(NodePersistentTasksExecutor.java:42) [elasticsearch-7.16.2.jar:7.16.2]
at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:777) [elasticsearch-7.16.2.jar:7.16.2]
at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:26) [elasticsearch-7.16.2.jar:7.16.2]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_131]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_131]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_131]
GeoIP报的错误,GeoIP processor | Elasticsearch Guide [7.14] | Elastic
错误信息主要是
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
解决方法如下,就是在下载jre的security目录下加入ssh的安全证书。不过不影响运行所以我就没解决。
https://blog.csdn.net/faye0412/article/details/6883879
2. 下载安装jdk
因为已经安装过JDK,所以直接查看环境变量是否正确。
3. Kibana
版本要和elasticsearch匹配,都下载的7.16.2版本
Download Kibana Free | Get Started Now | Elastic
打开kibana,双击bin文件夹下的kibana.bat,注意需要先打开elasticsearch才能打开kibana。
这个等的时间比较久。然后进入http://localhost:5601测试是否成功。成功的话进入如下页面
4.测试ELK中的elasticsearch和kibana
目的:在elasticsearch中手动加入数据,kibana去读取然后可视化。
Elastic Observability 为您提供单一堆栈来统一您的日志、指标、正常运行时间数据、应用程序跟踪、用户体验数据和合成数据。 将您的数据直接提取到 Elasticsearch,您可以在其中进一步处理和增强数据,然后在 Kibana 中对其进行可视化。
以上是关于在Windows10系统下部署ELK(待更新)的主要内容,如果未能解决你的问题,请参考以下文章