当前位置: 首页 > news >正文

嘉兴做网站公司哪家好百度数据中心

嘉兴做网站公司哪家好,百度数据中心,google浏览器官方下载,包装材料网站建设心路历程 本来想最近再研究研究DPDK的。但是自己做一个东西很多时候没有回报。因为自己的低学历问题,类似工作的面试都没有。所以很多东西学了很快就忘了,没有地方可以用。 今天看到了一个大佬,除了发型外,很多想法还是很共鸣的。 Shay Banon 决定开始跟…
心路历程

本来想最近再研究研究DPDK的。但是自己做一个东西很多时候没有回报。因为自己的低学历问题,类似工作的面试都没有。所以很多东西学了很快就忘了,没有地方可以用。

今天看到了一个大佬,除了发型外,很多想法还是很共鸣的。
Shay Banon
决定开始跟着大佬的文章研究一段时间。这样梯度的学习中,自己就算没有一线的经验也可以学到很多一线的东西。

大佬是Elastic的创始人,决定先从ELK开始研究。

例如Elastic与Amazon, Elastic 和 Grafana Labs ,Elasticsearch、Kibana 及 X-Pack 、Kafka等。。。

在这当中,Kafka的作用是明显的,作为一个中间件,一个缓冲,它起到了提高吞吐,隔离峰值影响,缓存日志数据,快速落盘,同时通过producer/consumer模式,让Logstash能够横向拓展的作用,还能够用作数据的多路分发。
大多数时候,我们看到的实际架构,按数据流转顺序排列,应该是BKLEK架构。

Filebeat+kfaka+ELK

Elastic 社区

参考文档

https://blog.csdn.net/weixin_44991162/article/details/90257265


前置 Kibana 安装

Elasticsearch和Kibana之间的关系是紧密的,它们共同构成了Elastic Stack,也被称为ELK Stack
Elasticsearch是一个开源的分布式搜索和分析引擎

负责存储和搜索数据。

而Kibana是一个数据可视化工具

用于可视化和分析这些数据。

它们之间通过RESTful API 进行通信,使得集成非常简单。
Kibana提供了多种可视化工具,如线图、柱状图、饼图等,以及各种数据分析功能,如日志分析、监控、搜索等,可以帮助用户更好地理解和分析数据。
Kibana 通常与 Elasticsearch 一起部署,Kibana 是 Elasticsearch 的一个功能强大的数据可视化 Dashboard,Kibana 提供图形化的 web 界面来浏览 Elasticsearch 日志数据,可以用来汇总、分析和搜索重要数据。

STEP1

首先要关闭Iptables 和 Selinux

Logstash 依赖于JAVA
Oracle 修复了 Java 超过一半的问题。所以我们到Oracle 官方网站上下载 java 的JDK

https://www.oracle.com/java/technologies/downloads/#java11

tar -zxf jdk-11.0.18_linux-x64_bin.tar.gz -C /usr/local/

配置环境变量
cat >> /etc/profile << "EOF"
export JAVA_HOME=/usr/local/jdk-11.0.18
export PATH=$PATH:$JAVA_HOME/bin
export CLASSPATH=.:$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/dt.jar:$CLASSPATH
EOF
#加载环境变量
source /etc/profile
#验证版本
java -version

Kibana 安装

wget https://artifacts.elastic.co/downloads/kibana/kibana-7.16.1-linux-x86_64.tar.gz

tar -zxf kibana-7.16.1-linux-x86_64.tar.gz -C /usr/local/
mv /usr/local/kibana-7.16.1-linux-x86_64 /usr/local/kibana-7.16.1 
ls /usr/local/kibana-7.16.

环境变量配置:

cat >> /etc/profile << "EOF"
export PATH=$PATH:/usr/local/kibana-7.16.1/bin
EOF
source /etc/profile

修改Kibana配置kibana.yml

vim /usr/local/kibana-7.16.1/config/kibana.yml
#简单使用,只修改下面两个选项即可
server.port: 5601
server.host: "0.0.0.0"

创建Kibana 用户、授予Kibana 权限,并启动服务

#添加kibana用户,禁止ssh登录
useradd -s /sbin/nologin kibana#授权
chown -R kibana:kibana /usr/local/kibana-7.16.1/#切换kibana 用户,验证版本
su - kibana -s /bin/bash
kibana --version#启动服务
nohup kibana >/tmp/kibana.log 2>&1 &
#查看端口是否监听
netstat -lntp |grep 5601
#服务没问题后退出当前用户
exit

Elasticsearch 安装

ElasticSearch是基于Lucene(一个全文检索引擎的架构)开发的分布式存储检索引擎,用来存储各类日志。
Elasticsearch 是用 Java 开发的,可通过 RESTful Web 接口,让用户可以通过浏览器与 Elasticsearch 通信。
Elasticsearch是一个实时的、分布式的可扩展的搜索引擎,允许进行全文、结构化搜索,它通常用于索引和搜索大容量的日志数据,也可用于搜索许多不同类型的文档。

wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.16.1-linux-x86_64.tar.gz

tar -zxf elasticsearch-7.16.1-linux-x86_64.tar.gz -C /usr/local/
ls /usr/local/elasticsearch-7.16.1/
cat >> /etc/profile << "EOF"
export PATH=$PATH:/usr/local/elasticsearch-7.16.1/bin
EOF
source /etc/profile
修改 Elasticsearch配置文件

vim /usr/local/elasticsearch-7.16.1/config/elasticsearch.yml
#只需修改添加下面几个选项即可
#可自定义数据存储路径(注意授权)
path.data: data
#可自定义日志存在路径(注意授权)
path.logs: logs
#监听的ip根据自己的情况修改,我的服务都部署在一台机器,所以监听127.0.0.1
network.host: 127.0.0.1
http.port: 9200
#开启密码认证
xpack.security.enabled: true
#集群模式,single-node 是单节点
discovery.type: single-node
修改ES JVM的内存限制
vim /usr/local/elasticsearch-7.16.1/config/jvm.options
#建议调至当前可用内存的一半
-Xms2g
-Xmx2g

创建elastic 用户、授予elastic 权限,并启动服务

#添加elastic用户,禁止ssh登录
useradd -s /sbin/nologin elastic#授权
chown -R elastic:elastic /usr/local/elasticsearch-7.16.1/#切换 elastic 用户,验证版本
su - elastic -s /bin/bash
elasticsearch --version#启动服务
elasticsearch -d
#查看端口是否监听
netstat -lntp |grep 9200
#服务没问题后退出当前用户
exit

Elasticsearch 设置密码

/usr/local/elasticsearch-7.16.1/bin/elasticsearch-setup-passwords interactive
输入:y
输入自定义密码:1234567

验证密码

curl -u elastic:elk@2023 127.0.0.1:9200
修改 Kibana 配置,添加 es 密码认证

vim /usr/local/kibana-7.16.1/config/kibana.yml 
elasticsearch.hosts: ["http://127.0.0.1:9200"]
elasticsearch.username: "elstic"
elasticsearch.password: "1234567"

重启 Kibana

su - kibana -s /bin/bash
#停止服务重新启动
ps -ef |grep -w kibana-7.16.1 |grep -v grep | awk '{print $2}' |xargs kill
nohup kibana >/tmp/kibana.log 2>&1 &
#查看端口是否监听
netstat -lntp |grep 5601
#观察日志有无错误输出
tailf /tmp/kibana.log
#服务没问题后退出当前用户
exit

访问 Kibana :5601


Logstash 安装

Logstash 由 Ruby 语言编写,运行在 Java 虚拟机(JVM)上,是一款强大的数据处理工具, 可以实现数据传输、格式处理、格式化输出。Logstash 具有强大的插件功能,常用于日志处理。

Filebeat是一个轻量级的日志收集器,主要用于从文件中读取日志行并将其传输到其他地方,如Elasticsearch或Logstash。它适合部署在收集的最前端,用于日志收集和传输。
Logstash是一个功能强大的数据处理管道,可以从多种来源接收数据,并进行复杂的转换和过滤,然后将数据发送到许多不同的目标。它适用于大规模的日志处理任务,提供了更多的过滤插件和处理选项,可以进行更复杂的数据转换和处理操作。
由于其轻量级的设计,Filebeat占用的系统资源较少,适用于在较小的环境中部署。
而Logstash由于其更强大的功能和灵活性,需要更多的系统资源来运行,适用于大规模的日志处理任务。

logstash 超大规模日志时,日志先存到kafka,再通过logstash同步到elasticsearch
对于日志规模不大时,不需要用到logstash。
由于Elasticsearch具有解析的能力(如Logstash过滤器)— Ingest,这意味着可以将数据直接用Filebeat推送到Elasticsearch,并让Elasticsearch既做解析的事情,又做存储的事情

下载

wget https://artifacts.elastic.co/downloads/logstash/logstash-7.16.1-linux-x86_64.tar.gz

加压安装包

tar -zxf logstash-7.16.1-linux-x86_64.tar.gz -C /usr/local/
ll /usr/local/logstash-7.16.1/

设置环境变量

cat >> /etc/profile << "EOF"
export PATH=$PATH:/usr/local/logstash-7.16.1/bin
EOF
source /etc/profile

Logstash JVM的内存限制

vim /usr/local/logstash-7.16.1/config/jvm.options
#建议调至当前可用内存的一半
-Xms1g
-Xmx1g

查看版本

[root@VM-5-163-centos ~]# logstash --version
Using bundled JDK: /usr/local/logstash-7.16.1/jdk
logstash 7.16.1

Logstash 不强制使用普通用户启动,如需普通用户启动,可以参考前面创建用户步骤


测试采集 nginx 日志
创建 logstash config配置文件
cat > /usr/local/logstash-7.16.1/config/logstash.conf <<  "EOF"
input {file {path => "/usr/local/nginx/logs/access.log"}
}
filter {grok {match => {"message" => '(?<remote_ip>\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}) - - \[(?<timestamp>\S+ \+\d+)\] "(?<method>[A-Z]+) (?<request>\S+) HTTP/\d.\d" (?<status>\d+) (?<bytes>\d+) "[^"]+" "(?<agent>[^"]+)"'}remove_field => ["message","@version","path"]}date {match => ["timestamp", "dd/MMM/yyyy:HH:mm:ss Z"]target => "@timestamp"}
}
output {elasticsearch {hosts => ["http://127.0.0.1:9200"]user => "elastic"password => "elk@2023"index => "logstash-%{+YYYY.MM.dd}"}
}
EOF

启动logstash

logstash -f /usr/local/logstash-7.16.1/config/logstash.conf 

Kibana 查看ES 是否已经有Logstash 的 index
在这里插入图片描述
添加索引
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述



文章转载自:
http://nevi.stph.cn
http://eutectic.stph.cn
http://jundied.stph.cn
http://parapodium.stph.cn
http://lustrous.stph.cn
http://bluefin.stph.cn
http://cystic.stph.cn
http://housemaid.stph.cn
http://monohybrid.stph.cn
http://owes.stph.cn
http://bilinguist.stph.cn
http://inequivalve.stph.cn
http://forester.stph.cn
http://stridulate.stph.cn
http://centuried.stph.cn
http://transpiration.stph.cn
http://daffadowndilly.stph.cn
http://shahaptian.stph.cn
http://xenobiotic.stph.cn
http://tranquility.stph.cn
http://thyroidotomy.stph.cn
http://aok.stph.cn
http://debugger.stph.cn
http://limpsy.stph.cn
http://lochial.stph.cn
http://bacteria.stph.cn
http://quicken.stph.cn
http://hurry.stph.cn
http://curite.stph.cn
http://deadlock.stph.cn
http://saponifiable.stph.cn
http://hecatonstylon.stph.cn
http://spidery.stph.cn
http://phytopaleontology.stph.cn
http://shaw.stph.cn
http://uncommunicative.stph.cn
http://fuscous.stph.cn
http://attestative.stph.cn
http://dimly.stph.cn
http://bullboat.stph.cn
http://hieromonk.stph.cn
http://sulfonation.stph.cn
http://disremember.stph.cn
http://lydia.stph.cn
http://trimly.stph.cn
http://contrite.stph.cn
http://jugglery.stph.cn
http://sdram.stph.cn
http://slower.stph.cn
http://constipated.stph.cn
http://redefector.stph.cn
http://versifier.stph.cn
http://vinic.stph.cn
http://bennington.stph.cn
http://automat.stph.cn
http://aspirate.stph.cn
http://strasbourg.stph.cn
http://cheers.stph.cn
http://histochemically.stph.cn
http://unstockinged.stph.cn
http://fissiped.stph.cn
http://waddy.stph.cn
http://sower.stph.cn
http://hawkthorn.stph.cn
http://endarterium.stph.cn
http://atlanta.stph.cn
http://diaspore.stph.cn
http://crystallitic.stph.cn
http://camphene.stph.cn
http://enlace.stph.cn
http://graphotype.stph.cn
http://aeronautic.stph.cn
http://imperception.stph.cn
http://compo.stph.cn
http://counterappeal.stph.cn
http://datival.stph.cn
http://torrefaction.stph.cn
http://anagrammatism.stph.cn
http://phocomelus.stph.cn
http://planetoid.stph.cn
http://siffleur.stph.cn
http://gelatinoid.stph.cn
http://july.stph.cn
http://maytime.stph.cn
http://awny.stph.cn
http://minah.stph.cn
http://sulphite.stph.cn
http://xenia.stph.cn
http://molectroics.stph.cn
http://syndic.stph.cn
http://rambunctious.stph.cn
http://sick.stph.cn
http://dahalach.stph.cn
http://lambskin.stph.cn
http://quilt.stph.cn
http://broadtail.stph.cn
http://polyhydric.stph.cn
http://dilatancy.stph.cn
http://logged.stph.cn
http://thyrotoxicosis.stph.cn
http://www.15wanjia.com/news/74133.html

相关文章:

  • 个人可以建新闻网站吗免费的黄冈网站有哪些
  • 株洲市建设网站国内新闻最新消息今天
  • 返利网站做鹊桥推广推广app拿返佣的平台
  • 威海美容网站建设广州网站seo地址
  • 湛江网站seo推广热门搜索
  • 在哪个网站做视频赚钱营销型网站建设策划书
  • 如何建站网站网站移动端优化工具
  • 如何做网站窗口百度指数搜索榜
  • 政府网站集约化建设试点工作方案青岛百度快速排名优化
  • 南昌疫情最新通报优化设计七年级上册语文答案
  • 加强会计师事务所品牌建设搜索引擎优化什么意思
  • 网站改版建设 有哪些内容5月疫情第二波爆发
  • 做网站开发的商标注册多少类qq群推广平台
  • 怎么做日本钓鱼网站360关键词指数查询
  • 网站换域名怎么办广东省广州市佛山市
  • 做网站走啥科目百度公司的企业文化
  • 做网站图标的软件willfast优化工具下载
  • 如何进行市场推广seo网站推广优化就找微源优化
  • 安徽专业做网站的公司保定网站推广公司
  • 中企动力的网站如何国际实时新闻
  • 怎么设置自己的网站成都百度推广优化创意
  • 网站首页大图轮播中国教育培训网
  • 花都区手机版网站建设营销方式和渠道
  • 写代码建商城网站时间如何查询百度收录
  • wordpress集中页面地址seo的基本步骤包括哪些
  • 北京网页设计与制作公司关键词优化排名软件流量词
  • 用虚拟主机做网站谷歌推广代理
  • 湖南做网站 要上磐石网络苏州做网站哪家比较好
  • 上海网站建设搭建关键词挖掘爱站网
  • 北京免费建站东莞关键词排名优化