随笔分类 -  Elasticsearch

摘要:1.安装geoip ElasticSearch 可以使用 ingest-geoip 插件可以在 Kibana 上对 IP 进行地理位置分析, 这个插件需要 Maxmind 的 GeoLite2 City,GeoLite2 国家和 GeoLite2 ASN geoip2 数据库。有关更多详细信息,请参 阅读全文
posted @ 2020-08-22 15:34 等等马上就好 阅读(306) 评论(0) 推荐(0)
摘要:1.收集多日志到ES 1)方式一: [root@web01 ~]# vim /etc/filebeat/filebeat.yml filebeat.inputs: - type: log enable: true paths: - /var/log/nginx/access.log json.key 阅读全文
posted @ 2020-08-22 15:31 等等马上就好 阅读(268) 评论(0) 推荐(0)
摘要:1.配置收集日志到logstash [root@web01 ~]# vim /etc/filebeat/filebeat.yml filebeat.inputs: - type: log enable: true paths: - /var/log/nginx/access.log json.key 阅读全文
posted @ 2020-08-22 15:29 等等马上就好 阅读(449) 评论(0) 推荐(0)
摘要:1)配置 [root@web01 ~]# vim /etc/filebeat/filebeat.yml filebeat.inputs: - type: log enable: true paths: - /var/log/nginx/access.log json.keys_under_root: 阅读全文
posted @ 2020-08-22 15:28 等等马上就好 阅读(334) 评论(0) 推荐(0)
摘要:1)配置 [root@web01 ~]# vim /etc/filebeat/filebeat.yml filebeat.inputs: - type: log enable: true paths: - /var/log/nginx/access.log json.keys_under_root: 阅读全文
posted @ 2020-08-22 15:26 等等马上就好 阅读(1502) 评论(0) 推荐(0)
摘要:1.配置收集日志到文件 [root@web01 ~]# vim /etc/filebeat/filebeat.yml filebeat.inputs: - type: log enable: true paths: - /var/log/nginx/access.log output.file: p 阅读全文
posted @ 2020-08-22 15:25 等等马上就好 阅读(1693) 评论(0) 推荐(0)
摘要:1.配置 filebeat.inputs: - type: log enable: true paths: - /var/log/nginx/access.log output.elasticsearch: hosts: ["10.0.0.51:9200"] 2.启动 [root@web01 ~]# 阅读全文
posted @ 2020-08-22 15:24 等等马上就好 阅读(2889) 评论(0) 推荐(0)
摘要:1.filebeat收集本地日志到文件配置 [root@web01 ~]# vim /etc/filebeat/filebeat.yml filebeat.inputs: - type: log enable: true paths: - /var/log/messages output.file: 阅读全文
posted @ 2020-08-22 15:23 等等马上就好 阅读(864) 评论(0) 推荐(0)
摘要:1.简介 Filebeat附带预构建的模块,这些模块包含收集、解析、充实和可视化各种日志文件格式数据所需的配置,每个Filebeat模块由一个或多个文件集组成,这些文件集包含摄取节点管道、Elasticsearch模板、Filebeat勘探者配置和Kibana仪表盘。 Filebeat模块很好的入门 阅读全文
posted @ 2020-08-22 15:21 等等马上就好 阅读(171) 评论(0) 推荐(0)
摘要:1.rsyslog介绍 在centos 6及之前的版本叫做syslog,centos 7开始叫做rsyslog,根据官方的介绍,rsyslog(2013年版本)可以达到每秒转发百万条日志的级别,官方网址:http://www.rsyslog.com/ 2.安装 [root@web01 ~]# yum 阅读全文
posted @ 2020-08-22 15:20 等等马上就好 阅读(254) 评论(0) 推荐(0)
摘要:1.配置收集日志 [root@web01 ~]# vim /etc/logstash/conf.d/tcp.conf input { tcp { port => "1234" mode => "server" } } output { stdout {} } 2.使用telnet测试 [root@d 阅读全文
posted @ 2020-08-22 15:19 等等马上就好 阅读(494) 评论(0) 推荐(0)
摘要:1.配置将数据写入redis [root@web01 ~]# vim /etc/logstash/conf.d/nginx_to_redis.conf input { file { path => "/var/log/nginx/access.log" start_position => "begi 阅读全文
posted @ 2020-08-22 15:16 等等马上就好 阅读(427) 评论(0) 推荐(0)
摘要:1.方法一: 1)修改tomcat日志收集配置 [root@web01 ~]# vim /etc/logstash/conf.d/tomcat_json_es.conf input { file { path => "/usr/local/tomcat/logs/tomcat_access_json 阅读全文
posted @ 2020-08-22 15:15 等等马上就好 阅读(187) 评论(0) 推荐(0)
摘要:1.安装Nginx [root@web01 ~]# yum install -y nginx 2.配置Nginx日志格式 [root@web01 ~]# vim /etc/nginx/nginx.conf ... ... http { log_format json '{"@timestamp":" 阅读全文
posted @ 2020-08-22 15:14 等等马上就好 阅读(193) 评论(0) 推荐(0)
摘要:1.安装Tomcat 1.安装java环境 [root@web01 ~]# rpm -ivh jdk-8u181-linux-x64.rpm 2.上传包 [root@web01 ~]# rz apache-tomcat-10.0.0-M7.tar.gz 3.解压 [root@web01 ~]# ta 阅读全文
posted @ 2020-08-22 15:13 等等马上就好 阅读(1129) 评论(0) 推荐(0)
摘要:1.Logstash的配置文件 [root@web01 ~]# vim /etc/logstash/logstash.yml path.config: /etc/logstash/conf.d 2.logstash收集日志文件到文件 [root@web01 ~]# vim /etc/logstash 阅读全文
posted @ 2020-08-22 15:11 等等马上就好 阅读(459) 评论(0) 推荐(0)
摘要:1.ES搭建 2.搭建 Logstash 1)安装java环境 1.上传java包 2.安装Java环境 2)时间同步 [root@web01 ~]# ntpdate time1.aliyun.com 3)安装Logstash 1.上传包 [root@web01 ~]# rz logstash-6. 阅读全文
posted @ 2020-08-17 21:18 等等马上就好 阅读(197) 评论(0) 推荐(0)
摘要:1.ELK Stack 组成 Software Description Function E:Elasticsearch Java 程序 存储,查询日志 L:Logstash Java 程序 收集、过滤日志 K:Kibana Java 程序 提供 Web 服务,将数据页面化 F:Filebeat g 阅读全文
posted @ 2020-08-17 21:09 等等马上就好 阅读(173) 评论(0) 推荐(0)
摘要:1.安装插件 [root@db01 ~]# /usr/share/elasticsearch/bin/elasticsearch-plugin install https://github.com/medcl/elasticsearch-analysis-ik/releases/download/v 阅读全文
posted @ 2020-08-17 14:33 等等马上就好 阅读(127) 评论(0) 推荐(0)
摘要:1.安装npm环境 # 安装npm(只需要在一个节点安装即可,如果前端还有nginx做反向代理可以每个节点都装) [root@elkstack01 ~]# yum install -y npm # 进入下载head插件代码目录 [root@elkstack01 src]# cd /usr/local 阅读全文
posted @ 2020-08-17 14:31 等等马上就好 阅读(3509) 评论(0) 推荐(0)