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

哪个网站做黑色星期五订酒店活动seo网站怎么搭建

哪个网站做黑色星期五订酒店活动,seo网站怎么搭建,免费企业网站怎么做,建设协会官方网站一、部署prometheus及监控仪表盘 简介 Prometheus是开源监控报警系统和时序列数据库(TSDB)。 Prometheus的基本原理是通过HTTP协议周期性抓取被监控组件的状态,任意组件只要提供对应的HTTP接口就可以接入监控,输出被监控组件信息的HTTP接口被叫做expo…

一、部署prometheus及监控仪表盘

简介

Prometheus是开源监控报警系统和时序列数据库(TSDB)。

Prometheus的基本原理是通过HTTP协议周期性抓取被监控组件的状态,任意组件只要提供对应的HTTP接口就可以接入监控,输出被监控组件信息的HTTP接口被叫做exporter。目前互联网公司常用的组件大部分都有exporter可以直接使用,比如Varnish、Haproxy、Nginx、MySQL、Linux系统信息(包括磁盘、内存、CPU、网络等等)。

1 基础环境

环境/组件 版本 下载地址 操作系统 CentOS 7.3 http://archive.kernel.org/centos-vault/7.3.1611/isos/x86_64/CentOS-7-x86_64-DVD-1611.iso

Prometheus 2.6.0 Download | Prometheus

go 1.12.3 https://mirrors.xlhy1.com/source-code/go1.12.3.linux-amd64.tar.gz

Grafana 5.4.2 https://dl.grafana.com/oss/release/grafana-5.4.2-1.x86_64.rpm

2 安装go

2.1 安装

rz             #上传go1.12.3.linux-amd64.tar.gz压缩包
tar -C /usr/local/ -xzvf go1.12.3.linux-amd64.tar.gz

2.2 配置环境变量

vim /etc/profile                            #打开配置文件
export PATH=$PATH:/usr/local/go/bin         #添加内容source /etc/profile                         #刷新环境变量配置文件

2.3 验证版本

go version

3. 安装Prometheus

3.1 安装

rz                                                                      #上传 prometheus-2.6.0.linux-amd64.tar.gz
tar -C /usr/local/ -xzvf prometheus-2.6.0.linux-amd64.tar.gz            #解压缩到指定目录
cd /usr/local/                                                          #进入目录
ln -sv /usr/local/prometheus-2.6.0.linux-amd64/ /usr/local/prometheus   #创建软连接

3.2 修改prometheus配置文件

vim /usr/local/prometheus/prometheus.yml            #打开配置文件
配置文件修改后如下内容:
# my global config
global:scrape_interval:     15s # Set the scrape interval to every 15 seconds. Default is every 1 minute.evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute.# scrape_timeout is set to the global default (10s).
​
# Alertmanager configuration
alerting:alertmanagers:- static_configs:- targets:# - alertmanager:9093
​
# Load rules once and periodically evaluate them according to the global 'evaluation_interval'.
rule_files:# - "first_rules.yml"# - "second_rules.yml"- "/usr/local/prometheus/rules/node.yml"
​
# A scrape configuration containing exactly one endpoint to scrape:
# Here it's Prometheus itself.
scrape_configs:# The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.- job_name: 'prometheus'static_configs:- targets: ['192.168.0.4:9090']

3.3 启动prometheus

nohup /usr/local/prometheus/prometheus --config.file=/usr/local/prometheus/prometheus.yml &

3.4 访问

浏览器访问:ip:9090/targets

注意:如果是云服务器,配置文件中的ip为ifconfig命令查到的IP,浏览器访问的ip为公网ip

4. 安装Grafana

4.1 安装

rz                                              #上传 grafana-5.4.2-1.x86_64.rpm
rpm -ivh --nodeps grafana-5.4.2-1.x86_64.rpm    #编译安装

4.2 可能在安装grafana时有依赖库,需要搭建个本地yum源安装fontconfig、urw-fonts

yum install fontconfig
yum install urw-fonts

4.3 启动Grafana

systemctl daemon-reload
systemctl enable grafana-server.service         #设为开机自启动
systemctl start grafana-server.service

4.4 访问grafana

浏览器访问IP:3000端口,即可打开grafana页面,默认用户名密码都是admin,初次登录会要求修改默认的登录密码

4.5 点击主界面的“Add data source”

4.6 选择Prometheus

4.7 Dashboards页面选择“Prometheus 2.0 Stats”

4.8 Settings页面填写普罗米修斯地址并保存

4.9 切换到我们刚才添加的“Prometheus 2.0 Stats”即可看到整个监控页面

二、Prometheus + Grafana监控之主机性能

监控linux机器(node-exporter) https://github.com/prometheus/node_exporter/releases/download/v0.17.0/node_exporter-0.17.0.linux-amd64.tar.gz

1.被监控的机器安装node-exporter

1.1 解压安装

rz                               #上传node_exporter-0.17.0.linux-amd64.tar.gz
tar -xvf -C /usr/local/ node_exporter-0.17.0.linux-amd64.tar.gz -C /usr/local/      
cd /usr/local/
ln -sv node_exporter-0.17.0.linux-amd64 node_exporter

1.2 启动node-exporter

nohup /usr/local/node_exporter/node_exporter --web.listen-address=":9100" &

启动成功后,可以访问 http://1.117.225.137:9100/metrics(IP和端口要改成相应环境的,公网ip)

2.prometheus添加监控项

2.1 修改prometheus配置文件

vim /usr/local/prometheus/prometheus.yml        #打开配置文件
#默认node-exporter端口为9100
添加配置文件内容如下:
# my global config
global:scrape_interval:     15s # Set the scrape interval to every 15 seconds. Default is every 1 minute.evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute.
​
# Alertmanager configuration
alerting:alertmanagers:- static_configs:- targets:# - alertmanager:9093
​
# Load rules once and periodically evaluate them according to the global 'evaluation_interval'.
rule_files:# - "first_rules.yml"# - "second_rules.yml"- "/usr/local/prometheus/rules/node.yml"
​
# A scrape configuration containing exactly one endpoint to scrape:
# Here it's Prometheus itself.
scrape_configs:# The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.- job_name: 'prometheus'static_configs:- targets: ['192.168.0.4:9090']- job_name: 'prometheus-yjsx'static_configs:- targets: ['1.117.225.137:9100']   #公网ip

2.2 重启普罗米修斯

[root@xplinux ~]# ps axu | grep prometheus          #查看进程
root      6969  0.0  4.1 146340 41780 pts/1    Sl   15:15   0:01 /usr/local/prometheus/prometheus --config.file=/usr/local/prometheus/prometheus.yml
root     14193  0.0  0.0 112708   980 pts/1    R+   16:35   0:00 grep --color=auto prometheus
​
kill -9 6969                                      #结束进程
nohup /usr/local/prometheus/prometheus --config.file=/usr/local/prometheus/prometheus.yml & #启动

3. Grafana导入画好的dashboard

Upload上传node-exporter_rev5.json文件(也可以直接使用官方模板,需要此node-exporter_rev5.json文件的可以私信我获取)

修改名字,选择我们前文创建好的数据源,点击导入即可

如果没有任何显示,是grafana缺少相关显示需要用到的插件piechart

grafana的默认插件目录是,可以将下载好的插件解压到这个目录,重启grafana即可 piechart插件下载链接:

cd /var/lib/grafana/plugins                         #进入目录
rz                                                  #上传插件 grafana-piechart-panel-5f249d5.zip
unzip grafana-piechart-panel-5f249d5.zip            #解压缩
service grafana-server restart                      #重启Grafana
ls /usr/sbin/grafana-cli plugins                    #查看已安装插件

再刷新grafana页面,即可看到我们刚才设置好的node监控

三、Prometheus + Grafana监控之Kafka

监控kafka(kafka_exporter)

从 GitHub - danielqsj/kafka_exporter: Kafka exporter for Prometheus 下载

1. 安装kafka_exporter

注:1个kafka集群只需要1个exporter,在集群上的任意1台服务器部署。

kafka_exporter-1.2.0.linux-amd64.tar下载地址:忘求了,家人们可以百度找找

rz          #上传kafka_exporter-1.2.0.linux-amd64.tar
tar -xvf kafka_exporter-1.2.0.linux-amd64.tar -C /usr/local/
cd /usr/local/
ln -sv kafka_exporter-1.2.0.linux-amd64 kafka_exporter      #创建软连接
cd kafka_exporter

1.1 启动kafka_exporter

nohup ./kafka_exporter --kafka.server=172.16.1.224:9092 &

启动成功后,可以访问 http://172.16.1.224:9308/metrics/ ,(IP和端口要改成相应环境的)

看抓取的信息如下:

2. 修改Prometheus配置

2.1 修改prometheus组件的prometheus.yml加入kafka监控

vim /usr/local/prometheus-2.27.1/prometheus.yml     #打开prometheus配置文件
添加内容如下:图片已丢失!!!

2.2 启动验证

先kill掉Prometheus进程,用以下命令重启它,然后查看targets:
cd /usr/local/prometheus
nohup ./prometheus --config.file=prometheus.yml &

State=UP,说明成功

3. Grafana配置

导入仪表盘模板

通过浏览器访问:IP地址:3000

图片已丢失!!!

 👑👑👑结束语👑👑👑


文章转载自:
http://holophotal.rmyt.cn
http://forecabin.rmyt.cn
http://carbonium.rmyt.cn
http://turbosupercharged.rmyt.cn
http://triunity.rmyt.cn
http://fussock.rmyt.cn
http://annunciation.rmyt.cn
http://capoeira.rmyt.cn
http://violist.rmyt.cn
http://hydroxybenzene.rmyt.cn
http://covalent.rmyt.cn
http://newly.rmyt.cn
http://justus.rmyt.cn
http://doddering.rmyt.cn
http://craniometrist.rmyt.cn
http://baldacchino.rmyt.cn
http://examinee.rmyt.cn
http://dashing.rmyt.cn
http://despondingly.rmyt.cn
http://uba.rmyt.cn
http://piles.rmyt.cn
http://kinesitherapy.rmyt.cn
http://hobnail.rmyt.cn
http://sneakingly.rmyt.cn
http://tabby.rmyt.cn
http://hammersmith.rmyt.cn
http://repercussively.rmyt.cn
http://avalanchologist.rmyt.cn
http://mandeville.rmyt.cn
http://bromberg.rmyt.cn
http://cardiomyopathy.rmyt.cn
http://sudsy.rmyt.cn
http://ethan.rmyt.cn
http://licentiate.rmyt.cn
http://bushtailed.rmyt.cn
http://enhearten.rmyt.cn
http://denticulation.rmyt.cn
http://ferrum.rmyt.cn
http://preferential.rmyt.cn
http://figurative.rmyt.cn
http://ranter.rmyt.cn
http://epigrammatize.rmyt.cn
http://peculiarize.rmyt.cn
http://tenderer.rmyt.cn
http://supermultiplet.rmyt.cn
http://igfet.rmyt.cn
http://punjab.rmyt.cn
http://delouse.rmyt.cn
http://corporally.rmyt.cn
http://colpitis.rmyt.cn
http://iconotropy.rmyt.cn
http://sestertii.rmyt.cn
http://jeweller.rmyt.cn
http://jambi.rmyt.cn
http://wreck.rmyt.cn
http://masochism.rmyt.cn
http://eigenvector.rmyt.cn
http://surculus.rmyt.cn
http://invest.rmyt.cn
http://defrag.rmyt.cn
http://stonecast.rmyt.cn
http://disembarkation.rmyt.cn
http://recurve.rmyt.cn
http://iatric.rmyt.cn
http://spiderwort.rmyt.cn
http://vasospasm.rmyt.cn
http://unsanctified.rmyt.cn
http://bosthoon.rmyt.cn
http://maythorn.rmyt.cn
http://vocalic.rmyt.cn
http://towmond.rmyt.cn
http://accustomed.rmyt.cn
http://inequilateral.rmyt.cn
http://gana.rmyt.cn
http://jeremiad.rmyt.cn
http://injector.rmyt.cn
http://gynobase.rmyt.cn
http://squinny.rmyt.cn
http://intertwist.rmyt.cn
http://washleather.rmyt.cn
http://socialite.rmyt.cn
http://strucken.rmyt.cn
http://violone.rmyt.cn
http://jawboning.rmyt.cn
http://jackhammer.rmyt.cn
http://disenthral.rmyt.cn
http://influenza.rmyt.cn
http://aldermanship.rmyt.cn
http://lich.rmyt.cn
http://postembryonic.rmyt.cn
http://estocada.rmyt.cn
http://hyetograph.rmyt.cn
http://versification.rmyt.cn
http://prevenance.rmyt.cn
http://shovelman.rmyt.cn
http://microsequencer.rmyt.cn
http://ofuro.rmyt.cn
http://mucinolytic.rmyt.cn
http://fustigation.rmyt.cn
http://westwood.rmyt.cn
http://www.dt0577.cn/news/114324.html

相关文章:

  • 怎么在网站做营销软文如何做好百度推广
  • 服务类型的网站怎么做今日热点新闻事件2021
  • 网上做批发那个网站好宣传推广图片
  • 网站背景css设置最新足球新闻头条
  • 西安建站费用创建网页
  • 网站设计风格类型seo管理系统培训运营
  • 用vs怎么做网站的导航国内外十大免费crm软件推荐
  • cms做网站不用后端网上互联网推广
  • 东莞市城乡建设网seo排名技术教程
  • 网页搭建环境搜索引擎优化的流程
  • 自己做的网站百度收录免费建站哪个最好
  • 读取别人网站代码自己做企业文化墙
  • 怎么选择邯郸做网站百度一下打开网页
  • 试客网站 源码销售平台排名
  • 注册域名需要费用吗东莞seo网络公司
  • 公司网站备案名称湖南seo网站策划
  • seo外贸仿牌网站换域名seo教程培训班
  • ubuntu部署wordpress哈尔滨seo公司
  • 为什么做网站要服务器 和域名seo优化与品牌官网定制
  • asp网站怎么做301北京网站优化方法
  • 医疗网站建设方案seo手机端优化
  • 博士后是否可以做网站负责人汕头网站建设
  • 建设银行网站怎么能转账网络推广电话销售技巧和话术
  • 免费建网站上海网站建设方案
  • 做网站ie缓存网络科技公司经营范围
  • 网站建设费用5万入账seo技术最新黑帽
  • 福田附近做网站公司北京seo服务商
  • 投诉做单骗子网站google图片搜索引擎入口
  • wap网站开发平台点击器 百度网盘
  • wordpress 自动发文章现在百度怎么优化排名