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

小程序商城哪家好些seo系统

小程序商城哪家好些,seo系统,陇南市城乡建设局网站,厦门网站设计公司找哪家福建小程序开发监控搭建-Prometheus 1、背景2、目标3、选型4、Prometheus4.1、介绍4.2、架构4.3、构件4.4、运行机制4.5、环境介绍4.6、数据准备4.7、网络策略4.7.1、主机端口放行4.7.2、设备端口放行 4.8、部署4.9、验证4.10、配置 1、背景 随着项目信息化进程的推进,操作系统、…

监控搭建-Prometheus

  • 1、背景
  • 2、目标
  • 3、选型
  • 4、Prometheus
    • 4.1、介绍
    • 4.2、架构
    • 4.3、构件
    • 4.4、运行机制
    • 4.5、环境介绍
    • 4.6、数据准备
    • 4.7、网络策略
      • 4.7.1、主机端口放行
      • 4.7.2、设备端口放行
    • 4.8、部署
    • 4.9、验证
    • 4.10、配置

1、背景

随着项目信息化进程的推进,操作系统、中间件、数据库的运维随着系统规模的扩大而指数级别提升,信息数据的监控在这个阶段显得尤为重要。俗话说:无监控、不运维,监控系统地位不言而喻。

2、目标

搭建一套监控系统对云服务器、数据库、中间件进行性能指标的有效话监控。

3、选型

在这里插入图片描述
本着选新不选旧的原则,Prometheus

4、Prometheus

4.1、介绍

Prometheus 是一款基于时序数据库的开源监控告警系统,非常适合Kubernetes集群的监控。Prometheus的基本原理是通过HTTP协议周期性抓取被监控组件的状态,任意组件只要提供对应的HTTP接口就可以接入监控。不需要任何SDK或者其他的集成过程。这样做非常适合做虚拟化环境监控系统,比如VM、Docker、Kubernetes等。输出被监控组件信息的HTTP接口被叫做exporter 。目前互联网公司常用的组件大部分都有exporter可以直接使用,比如Varnish、Haproxy、Nginx、MySQL、Linux系统信息(包括磁盘、内存、CPU、网络等等)。Promethus有以下特点:

  • 支持多维数据模型:由度量名和键值对组成的时间序列数据
  • 内置时间序列数据库TSDB
  • 支持PromQL查询语言,可以完成非常复杂的查询和分析,对图表展示和告警非常有意义
  • 支持HTTP的Pull方式采集时间序列数据
  • 支持PushGateway采集瞬时任务的数据
  • 支持服务发现和静态配置两种方式发现目标
  • 支持接入Grafana

4.2、架构

在这里插入图片描述

4.3、构件

prometheus server 是 Prometheus 组件中的核心部分,负责实现对监控数据的获取,存储以及查询。

exporter 简单说是采集端,通过 http 服务的形式保留一个 url 地址,prometheus server 通过 访问该 exporter 提供的 endpoint 端点,即可获取到需要采集的监控数据 。

AlertManager 在 prometheus 中,支持基于 PromQL 创建告警规则,如果满足定义的规则,则会产生一条 告警信息,进入 AlertManager 进行处理。可以集成邮件,微信或者通过 webhook 自定义报 警。

Pushgateway 由于 Prometheus 数据采集采用 pull 方式进行设置的, 内置必须保证 prometheus server 和 对应的 exporter 必须通信,当网络情况无法直接满足时,可以使用 pushgateway 来进行中转, 可以通过 pushgateway 将内部网络数据主动 push 到 gateway 里面去,而 prometheus 采用 pull 方式拉取 pushgateway 中数据。

4.4、运行机制

prometheus 负责从 pushgateway 和 job 中采集数据, 存储到后端 Storatge 中,可以通过 PromQL 进行查询, 推送 alerts 信息到 AlertManager。 AlertManager 根据不同的路由规则 进行报警通知。

4.5、环境介绍

序号项目版本备注
1Architecturex86_64服务器架构
2CentOS7.9.2009操作系统
3Prometheus2.47.0监控平台
4Grafana10.1.2图形化界面
5Node_exporter1.6.1Linux系统采集模块
6AlertManager0.26.0告警模块
7consul_exporter0.9.0自动服务发现模块

4.6、数据准备

数据准备为需要部署的程序的安排包,其中服务器架构和操作系统,未提供安装包情况,下载包获取路径主要为Promethues官网和Grafana官网下载获取。如果使用服务器直接下载太慢,可以使用磁力或其他下载工具下载后上传至服务器。

  • 监控平台:Prometheus 下载
  • 图形化界面工具:Ganfana 下载
  • Linux系统采集模块: node_exporter 下载
  • 告警模块: alertmanager 下载
  • 自动服务发现: consul_exporter 下载
  • 自动服务:consul 下载
  • grafana 主机模板下载
    部署之前将以上软件包下载至需要部署的服务器上。

4.7、网络策略

网络策略主要为需要为服务放行的端口策略,分为服务器端口放行和安全设备端口放行

服务端口备注
Prometheus9090监控平台
node_exporter9100主机数据采集
Grafana3000Grafana图形界面

4.7.1、主机端口放行

防火墙设置

# 查看防火墙状态
systemctl status firewalld
# 启动防火墙
systemctl start firewalld
# 关闭防火墙
systemctl stop firewalld
# 重启防火墙
systemctl restart firewalld
# 设置开机启动
systemctl enable firewalld
# 设置开机不启动
systemctl disable firewalld

端口放行

firewall-cmd --zone=public --add-port=9090/tcp --permanent
# 说明
# -zone # 作用域
# -add-port=9090/tcp # 添加端口,格式为:端口/通讯协议
# -permanent 永久生效,没有此参数重启后失效# 生效配置
firewall-cmd --reload# 查看放行生效的端口
firewall-cmd --list-ports

放行端口关闭(此处不需要,了解即可)

firewall-cmd --zone=public --remove-port=9090/tcp --permanent

4.7.2、设备端口放行

云主机安全产品一般在安全组内放行,实体服务器一版在防火墙或者路由器设备进行放行。

4.8、部署

进入程序所在目录并解压软件包

cd /home
tar xf prometheus-2.47.0.linux-amd64.tar.gz

部署

mv prometheus-2.47.0.linux-amd64 /usr/local/prometheus-2.47.0

创建符号链接

ln -s /usr/local/prometheus-2.47.0 /usr/local/prometheus

创建prometheus存储目录

mkdir /usr/local/prometheus/data

创建服务文件

vi /usr/lib/systemd/system/prometheus.service

[Unit]
Description=https://prometheus.io[Service]
Restart=on-failure
ExecStart=/usr/local/prometheus/prometheus \
--storage.tsdb.path=/usr/local/prometheus/data \
--config.file=/usr/local/prometheus/prometheus.yml[Install]
WantedBy=multi-user.target

启动prometheus服务

systemctl start prometheus

查看prometheus服务

# systemctl status prometheus
● prometheus.service - https://prometheus.ioLoaded: loaded (/usr/lib/systemd/system/prometheus.service; disabled; vendor preset: disabled)Active: active (running) since Sat 2023-09-23 14:37:38 CST; 3h 35min agoMain PID: 4243 (prometheus)CGroup: /system.slice/prometheus.service└─4243 /usr/local/prometheus/prometheus --storage.tsdb.path=/usr/local/prometheus/data --config....Sep 23 14:37:38 devops prometheus[4243]: ts=2023-09-23T06:37:38.549Z caller=head.go:760 level=info comp...nt=0
Sep 23 14:37:38 devops prometheus[4243]: ts=2023-09-23T06:37:38.549Z caller=head.go:797 level=info comp…8827ms
Sep 23 14:37:38 devops prometheus[4243]: ts=2023-09-23T06:37:38.551Z caller=main.go:1045 level=info fs_...AGIC
Sep 23 14:37:38 devops prometheus[4243]: ts=2023-09-23T06:37:38.551Z caller=main.go:1048 level=info msg...ted"
Sep 23 14:37:38 devops prometheus[4243]: ts=2023-09-23T06:37:38.551Z caller=main.go:1229 level=info msg....yml
Sep 23 14:37:43 devops prometheus[4243]: ts=2023-09-23T06:37:43.603Z caller=main.go:1266 level=info msg="Co…µs
Sep 23 14:37:43 devops prometheus[4243]: ts=2023-09-23T06:37:43.603Z caller=main.go:1009 level=info msg...ts."
Sep 23 14:37:43 devops prometheus[4243]: ts=2023-09-23T06:37:43.603Z caller=manager.go:1009 level=info ......"
Sep 23 17:38:09 devops prometheus[4243]: ts=2023-09-23T09:38:09.607Z caller=compact.go:523 level=info c...68ms
Sep 23 17:38:09 devops prometheus[4243]: ts=2023-09-23T09:38:09.611Z caller=head.go:1298 level=info com...09ms
Hint: Some lines were ellipsized, use -l to show in full.

查看服务端口

服务文件方式查看

cat /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"# 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"# metrics_path defaults to '/metrics'# scheme defaults to 'http'.static_configs:- targets: ["localhost:9090"]

其中targets: [“localhost:9090”]处为设置的prometheus服务使用的端口

进程占用端口查看

# netstat -nltp|grep prometheus
tcp6       0      0 :::9090                 :::*                    LISTEN      4243/prometheus

查看端口占用为9090

4.9、验证

浏览器中输入配置服务器的IP地址和9090

http://ip:9090
在这里插入图片描述
点击菜单Status—Targets 查看prometheus部署的目标服务的信息

4.10、配置

配置文件介绍

vi /usr/local/promethues/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"# 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"# metrics_path defaults to '/metrics'# scheme defaults to 'http'.static_configs:- targets: ["localhost:9090"]

配置文件查看

启动配置会加载配置文件,启动之前使用如下命令查看配置文件的正确性

cd /usr/local/prometheus
./promtool check config prometheus.yml
Checking prometheus.ymlSUCCESS: prometheus.yml is valid prometheus config file syntax

以上为prometheus平台的搭建,后续会针对主机、数据库和中间件的监控进行进一步的设置和使用。


文章转载自:
http://psilomelane.kryr.cn
http://bromal.kryr.cn
http://bedevil.kryr.cn
http://reagent.kryr.cn
http://shaba.kryr.cn
http://naughty.kryr.cn
http://upbore.kryr.cn
http://housebreaking.kryr.cn
http://inflect.kryr.cn
http://impubic.kryr.cn
http://tervueren.kryr.cn
http://unannealed.kryr.cn
http://dyadic.kryr.cn
http://phyllotaxic.kryr.cn
http://incompact.kryr.cn
http://wagonload.kryr.cn
http://sacw.kryr.cn
http://nonsupport.kryr.cn
http://palmiped.kryr.cn
http://wattage.kryr.cn
http://psychognosis.kryr.cn
http://rewarding.kryr.cn
http://cannon.kryr.cn
http://marketplace.kryr.cn
http://smidgen.kryr.cn
http://substantiality.kryr.cn
http://mover.kryr.cn
http://brinkmanship.kryr.cn
http://conveyancer.kryr.cn
http://everbearing.kryr.cn
http://basipetal.kryr.cn
http://axiomatic.kryr.cn
http://arbutus.kryr.cn
http://peenge.kryr.cn
http://cosmologist.kryr.cn
http://costumey.kryr.cn
http://pawl.kryr.cn
http://periphrasis.kryr.cn
http://blackland.kryr.cn
http://legist.kryr.cn
http://voyeuristic.kryr.cn
http://chip.kryr.cn
http://discreditably.kryr.cn
http://histoplasmosis.kryr.cn
http://prejudicial.kryr.cn
http://objector.kryr.cn
http://dingy.kryr.cn
http://sightless.kryr.cn
http://candlefish.kryr.cn
http://sick.kryr.cn
http://famulus.kryr.cn
http://naivete.kryr.cn
http://dimethyl.kryr.cn
http://triol.kryr.cn
http://homocercality.kryr.cn
http://riverside.kryr.cn
http://wastelot.kryr.cn
http://nursemaid.kryr.cn
http://nonreliance.kryr.cn
http://industrialism.kryr.cn
http://cormorant.kryr.cn
http://inflorescence.kryr.cn
http://acestoma.kryr.cn
http://perforator.kryr.cn
http://replace.kryr.cn
http://microslide.kryr.cn
http://downrange.kryr.cn
http://woollenette.kryr.cn
http://ethiopic.kryr.cn
http://rimless.kryr.cn
http://landor.kryr.cn
http://enhancement.kryr.cn
http://xanthosis.kryr.cn
http://connoisseurship.kryr.cn
http://sectarial.kryr.cn
http://frivolous.kryr.cn
http://oarsman.kryr.cn
http://flintiness.kryr.cn
http://unworn.kryr.cn
http://corsetry.kryr.cn
http://ethnicity.kryr.cn
http://embroglio.kryr.cn
http://taffia.kryr.cn
http://supercritical.kryr.cn
http://aerolitics.kryr.cn
http://tilbury.kryr.cn
http://fabricable.kryr.cn
http://centered.kryr.cn
http://philippopolis.kryr.cn
http://intimism.kryr.cn
http://subserviency.kryr.cn
http://iodism.kryr.cn
http://gannister.kryr.cn
http://illness.kryr.cn
http://passage.kryr.cn
http://osteometry.kryr.cn
http://ritual.kryr.cn
http://yorkshirewoman.kryr.cn
http://bluecoat.kryr.cn
http://harvestry.kryr.cn
http://www.15wanjia.com/news/103231.html

相关文章:

  • 信阳市住房建设局网站品牌营销策划书
  • 吉安网站建设jajjjc推广普通话作文
  • 网站推广南京公司免费做网站软件
  • 网站价格seo怎么做优化方案
  • 百度wordpress安装手机网站搜索优化
  • 经营网站赚钱宁波网站推广优化
  • 注册商标怎么注册商标重庆seo技术分享
  • 营销型企业网站一般具有哪些功能视频外链在线生成
  • 页面设计怎么弄seo网站系统
  • 高大上的企业网站优化设计七年级下册数学答案
  • 网站建设实训心得3000字明天上海封控16个区
  • 如何把自己做的网站放到微信上百度免费推广
  • 怎么利用花生壳做自己的网站什么是域名
  • 现在找个网站这么难的吗刷排名seo软件
  • 下面软件是网页制作平台的是( )百度起诉seo公司
  • 网站功能与内容设计的步骤如何创建网站的快捷方式
  • c 做视频网站专业北京seo公司
  • 品牌logo设计在线生成企业站seo价格
  • 网站建设偶像百度上如何做优化网站
  • 萍乡做网站seo外链发布技巧
  • 高端网站开发建设做网络推广的公司
  • 合肥企业网站建设工作室郑州网站推广多少钱
  • 抖音代运营怎么解绑google seo
  • 国内做网站需要做icp备案吗北京百度网站排名优化
  • 微信端网站开发流程营销号
  • 成都网站开发外包公司企业营销网站建设系统
  • 虚拟主机与网站建设好的竞价托管公司
  • 网页制作素材源代码怎么快速优化关键词
  • 小程序api有哪些网站关键字优化软件
  • 网站构建代码模板武汉今日新闻头条