ELK日志分析系统概述及部署(超级详细)

黑马程序员—Elasticsearch—ELK 视频地址 一:课程简介(1~2) 1.:    1)    2)    3)    4)    5)    6)    7) 2.:    1)    2)    3)    4)    5)    6)    7) 3.:    1)    2)    3)    4)    5)    6)    7) 4.:    1)    2)    3)    4)    5)    6)    7) 5.:    1)    2) 阅读详情

一、ELK日志分析系统

  • ELK有三部分组成
    E:Elasticsearch
    L:Logstash
    K:Kibana

1、日志服务器

  • 优点
    提高安全性
    集中化管理
  • 缺点
    对日志分析困难

2、日志处理步骤

1、将日志进行集中化管理

2、将日志格式化(Logstash)并输出到Elasticsearch

3、对格式化后的数据进行索引和存储(Elasticsearch)

4、前端数据的展示(Kibana)

二、Elasticsearch概述

  • 提供了一个分布式多用户能力的全文搜索引擎

1、Elasticsearch特性

  • 接近实时
  • 集群
  • 节点
  • 索引
    索引(库)→类型(表)→文档(记录)
  • 分片和副本

实际情况下,索引存储的数据可能超过单个节点的硬件限制,如一个10亿文档需1TB空间可能不适合存储在单个节点的磁盘上,或者从单个节点搜索请求太慢了,为了解决这个问题,elasticsearch提供将索引分成多个分片的功能,当在创建索引时,可以定义想要分片的数量。每个分片就是一个全功能的独立索引,可以位于集群中任何节点上。

分片:
1、水平分割扩展,增大存储量
2、分布式并行跨分片操作,提供性能和吞吐量

分布式分片的机制和搜索请求的文档如何汇总完全是有elasticsearch控制的,这些对用户而言是透明的

网络问题等等其他问题可以在任何时候不期而至,为了健壮性,强烈建议要有个故障切换机制,无论何种故障以防止分片或者节点不可用,为此,elasticsearch让我们将索引分片复制一份或多份,称为分片副本或副本

副本:

1、高可用性,以应对分片或者节点故障,出于这个原因,分片副本要在不同的节点上
2、性能加强,增加吞吐量,搜索可以并行在所有副本上执行

三、LogStash概述

  • 一款强大的数据处理工具
  • 可实现数据传输、格式处理、格式化输出
  • 数据输入、数据加工(如过滤,改写等)以及数据输出

由三个组件组成:Input、Output、Filter Plugin

Input:获取日志
Output:输出日志
Filter Plugin:过滤日志、格式处理

1、LogStash主要组件

Shipper
Indexer
Broker
Search and Storage
Web Interface

四、Kibana概述

一个针对Elasticsearch的开源分析及可视化平台
搜索、查看存储在Elasticsearch索引中的数据
通过各种图表进行高级数据分析及展示

Kibana主要功能

  • Elasticsearch无缝之集成
  • 整合数据,复杂数据分析
  • 让更多团队成员收益
  • 接口灵活,分享更容易
  • 配置简单、可视化多数据源
  • 简单数据导出

五、部署ELK日志分析系统

1、实验需求

1、配置ELK日志分析集群
2、使用Logstash收集日志
3、使用Kibana查看分析日志

2、环境配置

主机 操作系统 IP地址 安装包 / 软件 / 工具
node1 CentOS7 192.168.220.6 Elasticsearch
node2 CentOS7 192.168.220.7 Elasticsearch
apache CentOS7 192.168.220.5 httpd / Logstash
真机 Windows 192.168.220.9 ——

所有节点,关闭系统防火墙和安全机制

systemctl stop firewalld.service
setenforce 0

node1

hostnamectl set-hostname node1
su -

node2

hostnamectl set-hostname node2
su -

apache

hostnamectl set-hostname apache
su -

3、配置elasticsearch环境(node1、node2)

echo '192.168.220.6 node1' >> /etc/hosts
echo '192.168.220.7 node2' >> /etc/hosts

	
cd /opt
rz elasticsearch-5.5.0.rpm

rpm -ivh elasticsearch-5.5.0.rpm

systemctl daemon-reload
systemctl enable elasticsearch.service
cp /etc/elasticsearch/elasticsearch.yml /etc/elasticsearch/elasticsearch.yml.bak

vim /etc/elasticsearch/elasticsearch.yml

==17==
cluster.name: my-elk-cluster

==23==
node.name: node1						#这里node2节点设置为node2

==33==
path.data: /data/elk_data 

==37==
path.logs: /var/log/elasticsearch/

==43==
bootstrap.memory_lock: false 

==55==
network
超详细 ELK 日志分析系统 文章目录一、ELK日志分析系统简介1:ELK日志分析系统组成2:日志处理步骤二:三款软件简介1:Elasticsearch(1)Elasticsearch的概述(2)Elasticsearch核心概念2:Logstash(1)Logstash介绍(2)Logstash的主要组件三:ELK日志分析系统部署1:拓扑图2:实验环境 一、ELK日志分析系统简介 ELK日志分析系统是Logstash、Elastcsearch、Kibana开源软件的集合,对外是作为一个日志管理系统的开源方案,它可以从任何来源、任何格式 阅读详情

相关推荐

ELK、ELFK 日志分析系统

输入采用标准输入,输出采用标准输出(类似管道)#执行 ctrl+c 退出#使用 rubydebug 输出详细格式显示,codec 为一种编解码器#使用 Logstash 将信息写入 Elasticsearch 中结果不在标准输出显示,而是发送至 Elasticsearch 中,可浏览器访问 http://172.168.1.11:9100/ 查看索引信息和数据浏览。Logstash 配置文件基本由三部分组成:input、output 以及 filter(可选,根据需要选择使用)。

这里没有简介 1564

ELK基础及应用案例PPT

1. ELK简介和应用案例; 2. 通过mdc完善日志中的业务信息; 3. 通过logstash上传日志到elasticsearch; 4. 通过kibana对日志进行查询和统计及分析; 5. 通过api实现应用性能监控; 6. 通过uptime监控应用运行; 7. 通过机器学习分析日志; 8. 通过IP地址在地图上显示访问量统计;

ELK日志分析系统.pptx

ELK日志分析系统.pptx

从原理到实践:详解RGBD相机深度与彩色图像对齐(D2C)算法

本文深入解析了RGBD相机深度与彩色图像对齐(D2C)算法的原理与实现。针对自组装相机中深度图与彩色图不匹配的核心痛点,文章从相机模型、坐标系变换等数学基础讲起,剖析了传统点映射算法的缺陷,并重点介绍了高效的矩形区域映射算法。该算法通过将深度像素视为矩形区域进行映射,有效解决了空洞和遮挡问题,并附有可直接复用的C++代码与优化技巧,为三维重建、机器人视觉等应用奠定坚实基础。

weixin_28363123的博客 241

电子元器件基础:电阻、电容、电感的特性与应用解析

本文深入解析了电子元器件中电阻、电容和电感三大基础元件的核心特性、工作原理与选型应用。电阻作为电路中的‘交通警察’,控制电流与分配电压,其额定功率与精度是关键选型参数。文章结合实战经验,详细阐述了它们在电源滤波、信号处理及高频电路中的不同表现与避坑指南,是电子设计与维修的必备基础知识。

weixin_29213655的博客 375

1.4 点云数据获取方式——结构光相机

与此同时,利用相机从特定角度捕捉变形后的图案,基于三角测量原理,通过精确计算相机与投影仪之间的几何关系以及图案的变形程度,就能准确计算出物体表面各点的三维坐标,从而获取高精度的三维点云数据。在高端制造业中,对于微小零部件的尺寸测量和缺陷检测,结构光相机能够提供极其精确的数据,确保产品质量符合严格的标准。时序编码:这类相机通过序列投射多幅不同图案,如格雷码、相移条纹等,通过对这一系列图案的时间序列进行解码分析,就能够获取亚像素级精度的三维信息,其单点误差能够控制在≤0.1mm,展现出极高的测量精度。

qq625924821的博客 924

RT-DETR模型应用过程中的报错处理及疑问解答,涉及环境搭建、模型训练、模块改进、论文写作

本文记录了RT-DETR模型的这一系列过程中可能发生的问题,以及大家非常关心的问题,这里统一做了一个记录和解答。

Limiiiing的博客 1764

一篇文章带你快速入门 MATLAB

文章目录一、认识 MATLAB 界面二、MATLAB 的运行方式三、Matlab 中的窗口1. 命令窗口2. MATLAB的程序编辑窗口3. 工作空间窗口4. 命令历史窗口5. 图形窗口6. 当前目录窗口四、MATLAB的帮助系统1. 帮助命令2. 联机帮助五、其他知识补充1. MATLAB的搜索路径2. 变量命名规则3. M文件命名规则 一、认识 MATLAB 界面 在 MATLAB Desktop 中,工具条取代了菜单和工具栏。应用程序库收纳了 MATLAB 产品系列的应用程序,单一文件应用程序打包为一

南淮北安的博客 5126

使用Transformer实现自动调制识别(RML2016a)

image_size = 128 # resize重置输入大小patch_size = 2 # 从输入图片(信号看作图片)中将被提取的块大小# 分成 num_patches 个块num_patches = (image_size // patch_size) #(72/6)**2 横着裁剪),],return x)(x1, x1)# MLP.# Add MLP.x=x_train,y=y_train,filepath,round。

QAQIknow的博客 6276

FakeNewsGPT4:通过知识增强的大规模视觉语言模型推进多模态假新闻检测

当前,多模态假新闻的大量涌现导致了显著的分布差异,这一现状亟需我们开发具备广泛适用性的检测器。然而,现有假新闻检测器因特定领域内的训练方式,难以有效获取开放世界中的事实信息。这种训练的封闭性限制了传统检测器的能力,特别是在面对跨域假新闻时,其表现往往不尽如人意。具体而言,开放世界中的假新闻在两个方面具有显著的分布差异:一方面,其操纵内容多种多样,新闻的任一部分都可能受到创意策略的操控;另一方面,真实背景复杂多变,不同地区的新闻背景和主题焦点存在显著差异。

qq_52053775的博客 821

最新Anaconda3的安装配置及使用教程(详细过程)

最新Anaconda3安装使用Anaconda下载方式一:官网下载方式二:清华镜像下载(推荐)Anaconda安装 Anaconda是一个开源的Python发行版本,其包含了conda、Python等180多个科学包及其依赖项 Anaconda + Jupyter 基本上已经是大部分机器学习/数据分析等开发者标配的开发环境, 不多介绍,直接进去正题: Anaconda下载 方式一:官网下载 下载地址传送门: 官网首页:https://www.anaconda.com/ 官网下载页:https://www

HowieXue 薛永浩的博客 34万+

visio安装包

Microsoft Office Visio 是一款专业的制图软件。利用经过更新的形状、协作工具和数据链接图表,创建专业级图表以简化复杂的信息。

Data-Structures-and-Algorithm-Analysis-in-Java.pdf

作者: Weiss, Mark A. 出版社: Addison Wesley Data Structures and Algorithm Analysis in Java is an “advanced algorithms” book that fits between traditional CS2 and Algorithms Analysis courses. In the old ACM Curriculum Guidelines, this course was known as CS7. This text is for readers who want to learn good programming and algorithm analysis skills simultaneously so that they can develop such programs with the maximum amo...

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

LinePhone3.2.7(android端最新版本) sip客户端

SIP客户端For android:LinePhone3.2.7(最新版本),官网地址:http://www.linphone.org/

上一篇: 关系与非关系数据库概念,以及Redis简介
下一篇: Redis 安装部署,常用命令以及优化(有图有真相)
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值