![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
ELK
云原生解决方案
专注于云原生和企业devops体系的结合与落地
展开
-
docker-compose安装elk
参考1.编写docker-composecat >> docker-compose.yml <<EOFversion: "3" #版本号services: elasticsearch-1: #服务名称(不是容器名) image: elasticsearch #使用的镜像 ports: - "9200:9200" #暴露的端口信息和docker run -d -p 80:80一样 restart: "always" #重原创 2020-08-11 18:30:38 · 1483 阅读 · 0 评论 -
filebeat收集自定义日志
1.查看日志内容2020-08-10 20:19:54 Logout 121.*.*.5 wujian ppp0 1**.*8.4*.1 1*.1*8.*2.12.grok进行切割grok测试地址%{DATESTAMP:timestamp} %{WORD:severity} %{IP:client} %{USERNAME:username} %{USERNAME:device} %{IP:vlanIP} %{IP:assignIP}grok官方给出了很多封装好的patterns 我们可以直接用原创 2020-08-10 20:54:57 · 1357 阅读 · 0 评论 -
max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
docker启动elasticsearch的容器时 出现了这个错误ERROR: [1] bootstrap checks failed[1]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]ERROR: Elasticsearch did not exit normally - check the logs at /var/log/elasticsearch/elas原创 2020-08-05 16:16:38 · 160 阅读 · 0 评论 -
grok分割简单的日志格式
1.日志格式time: 2020-08-04_09:13:45clientIP: 121.$.30.1$5username: wuxindevice: ppp0vpnIP: 192.$.$.1assignIP: 192.$.$.$2.直接正则解析(?<time>(.*))\n(?<clientIP>(.*))\n(?<username>(.*))\n(?<device>(.*))\n(?<vpnIP>(.*))\n(?<as原创 2020-08-04 15:23:15 · 617 阅读 · 0 评论 -
filebeat使用module收集system日志
filebeatd操作1.启用filebeat模板官方格式[filebeat]# filebeat modules enable system[filebeat]# cat system.yml- module: system syslog: enabled: true var.paths: ["/var/log/*.log"] auth: enabled: true2.编辑pipelines.yml[root@c7-44 filebeat]# cat fi原创 2020-08-02 01:29:55 · 1503 阅读 · 1 评论 -
filebeat使用module收集nginx日志
1.安装filebeat客户端cat >> /etc/yum.repos.d/filebeat.repo <<EOF[filebeat-6.x]name=Elasticsearch repository for 6.x packagesbaseurl= https://artifacts.elastic.co/packages/6.x/yumgpgcheck=1gpgkey= https://artifacts.elastic.co/GPG-KEY-elasticsear原创 2020-07-31 14:18:09 · 875 阅读 · 0 评论 -
ELK7.11安装时的错误-elasticsearch
在安装7.11版本的elasticsearch时 多次出现 启动不了的情况 如以下日志:[root@c7-41 ~]# tailf /var/log/elasticsearch/ylm666.log [2020-07-31T07:17:14,180][INFO ][o.e.t.TransportService ] [node-1] publish_address {10.0.0.41:9300}, bound_addresses {10[2020-07-31T07:17:14,187][INFO原创 2020-07-31 07:26:10 · 460 阅读 · 0 评论 -
使用Docker搭建ELK日志系统
1.目标1.收集Java日志文件,并且根据文件的不同将日志分类,比如:订单日志,客户日志等。2.日志文件多行处理2.总体架构图3.ELK组件介绍ELK 是由三部分组成的一套日志分析系统,Elasticsearch: 基于json分析搜索引擎,Elasticsearch是个开源分布式搜索引擎,它的特点有:分布式,零配置,自动发现,索引自动分片,索引副本机制,restful风格接口,多数据源,自动搜索负载等。Logstash:动态数据收集管道,Logstash是一个完全开源的工具,它可以对你的.原创 2020-07-30 09:35:07 · 925 阅读 · 0 评论 -
[ERROR] 2020-07-24 10:14:28.629 [[main]<beats] javapipeline - A plugin had an unrecoverable error. W
看logstash日志的时候出现了这个问题 一直很困扰 希望可以帮助到 大家[ERROR] 2020-07-24 10:14:28.629 [[main]<beats] javapipeline - A plugin had an unrecoverable error. Will restart this plugin. Pipeline_id:main Plugin: <LogStash::Inputs::Beats host=>"0.0.0.0", port=>5原创 2020-07-24 13:29:53 · 3454 阅读 · 0 评论 -
filebeat使用module收集nginx.system日志
filebeat1启用module filebeat modules enable system filebeat modules enable nginx2.编辑filebeat.yml[filebeat]# cat filebeat.ymlfilebeat.config.modules: path: ${path.config}/modules.d/system.yml reload.enabled: falseoutput.logstash: hosts: ["10.0.原创 2020-09-12 21:54:15 · 364 阅读 · 0 评论 -
filebeat7.x-repo
[filebeat]# cat /etc/yum.repos.d/filebeat.repo[elastic-7.x]name=Elastic repository for 7.x packagesbaseurl=https://artifacts.elastic.co/packages/7.x/yumgpgcheck=1gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearchenabled=1autorefresh=1原创 2020-07-23 15:11:44 · 136 阅读 · 0 评论 -
elasticsearch启动时 bootstrap checks failed
[2020-07-23T14:56:10,152][ERROR][o.e.b.Bootstrap ] [node-1] node validation exception[1] bootstrap checks failed[1]: the default discovery settings are unsuitable for production use; at least one of [discovery.seed_hosts, discovery.seed_provider原创 2020-07-23 15:01:45 · 1986 阅读 · 0 评论 -
PERCONA-TOOLKIT 安装 使用
PERCONA-TOOLKIT 安装 使用官网:https://www.percona.com/downloads/percona-toolkit/LATEST/percona-toolkit是一组高级命令行工具的集合,可以查看当前服务的摘要信息,磁盘检测,分析慢查询日志,查找重复索引,实现表同步等等。这个工具套件对DBA及运维人员着实不可多得Server 192.168.88.8 主S...原创 2020-04-04 11:51:33 · 1100 阅读 · 0 评论 -
EFK收集tomcat日志
创建tomcat的topic[root@localhost kafka]# ./bin/kafka-topics.sh --create --zookeeper 192.168.88.8:2181 --replication-factor 2 --partitions 3 --topic tomcat #创建nginx的topic Cre...原创 2020-04-12 00:47:42 · 506 阅读 · 0 评论 -
EFK收集NGINX线程
NGINX(192.168.132.7)参考59. 创建nginx的topic ./bin/kafka-topics.sh --create --zookeeper 192.168.132.24:2181 --replication-factor 2 --partitions 3 --topic nginx60. yum -y install epel-release61. yum -y...原创 2020-04-04 18:24:10 · 232 阅读 · 0 评论 -
EFK收集messages线程
Server 192.168.132.7 :3G 2cpu(kibana filebeat logstash nginx)Server 192.168.132.17 :1G (httpd-tools elasticsearch)Server 192.168.132.24 :1G全局环境jdkrpm -ivh jdk-8u131-linux-x64_.rpm三台虚拟机都做(zookeep...原创 2020-04-04 09:43:32 · 277 阅读 · 0 评论 -
elastalert--基于elasticsearch层面的监控和邮件报警(kibana)
在做好ELK环境部署下elastalert读取指定elasticsearch索引,根据规则匹配,如果匹配到就发邮件报警关闭防火墙[root@localhost ~]# systemctl stop firewalld[root@localhost ~]# setenforce 01,安装python3elastalert是基于Python3版本的[root@localhost ~]...原创 2020-04-08 11:51:55 · 834 阅读 · 0 评论 -
ELK收集NGINX日志
server 192.168.88.8(elasticsearch logstash)server 192.168.88.17 (kibana httpd-tools)可视化图 常用命令参考nginx(192.168.88.8)yum -y install epel-releaseyum -y install nginx正则cd /usr/share/logstash/vendor/...原创 2020-04-05 18:26:25 · 426 阅读 · 0 评论 -
ELK收集messages线程
server 192.168.88.8 (elasticsearch logstash)server 192.168.88.17 (kibana httpd-tools)jdk两个服务器都要装elasticsearchyum -y install elasticsearch-6.6.2.rpmvim /etc/elasticsearch/elasticsearch.ymlsyste...原创 2020-04-05 18:06:55 · 364 阅读 · 0 评论