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

在线做免费网站有哪些厦门seo小谢

在线做免费网站有哪些,厦门seo小谢,.net做网站用mvc,动态网站代做1、介绍 背景:需要对多台虚机进行负载可视乎监控,并进行及时的报警 2、架构图 node_exporter :主要是负责采集服务器的信息。 Prometheus :主要是负责存储、抓取、聚合、查询方面。 Grafana : 主要是…

1、介绍

 背景:需要对多台虚机进行负载可视乎监控,并进行及时的报警

2、架构图

node_exporter :主要是负责采集服务器的信息。

Prometheus     :主要是负责存储、抓取、聚合、查询方面。

Grafana           : 主要是负责可视乎展示监控数据

3、搭建过程

配置要求:1台主服务器 + n台从服务器 (被监控的linux或windows虚机)

主服务器:Prometheus + Grafana

从服务器:node_exporter

参考链接

Prometheus+Grafana监控MySQL - 墨天轮

https://www.cnblogs.com/xiaozhaoboke/p/17779179.html

基于Prometheus+Grafana搭建监控平台(Windows/Linux环境exporter部署)_window 部署普罗米修斯-CSDN博客

 Prometheus(普罗米修斯)监控系统_普罗米修斯监控-CSDN博客

铸造性能监控平台【grafana+influxdb/prometheus+Linux/Windows】_grafana 模板12884-CSDN博客

3.1  搭建Prometheus

下载地址:https://github.com/prometheus/prometheus/releases/

搭建过程:

1、下载
wget https://github.com/prometheus/prometheus/releases/download/v2.16.0/prometheus-2.16.0.linux-amd64.tar.gz
tar xf prometheus-2.16.0.linux-amd64.tar.gz
mv prometheus-2.16.0.linux-amd64 /usr/local/prometheus2、配置
[root@Prometheus ~]# useradd -s /sbin/nologin prometheus
[root@Prometheus ~]# chown -R prometheus:prometheus /usr/local/prometheus/
[root@Prometheus ~]# vim /usr/lib/systemd/system/prometheus.service
[Unit]
Description=prometheus
After=network.target [Service]
User=prometheus
Group=prometheus
WorkingDirectory=/usr/local/prometheus
ExecStart=/usr/local/prometheus/prometheus
[Install]
WantedBy=multi-user.target3、启动prometheus服务
[root@Prometheus ~]# systemctl daemon-reload
[root@Prometheus ~]# systemctl enable --now prometheus	  	# 启动并开启自启
[root@Prometheus ~]# systemctl status prometheus		

 Prometheus 正常启动后,可通过ip:9090/graph方式来访问 Prometheus  UI 界面,效果如下:

备注:
(1)Prometheus配置文件默认路径   /usr/local/prometheus/prometheus.yml
(2)Prometheus监控数据默认存放路径   /usr/local/prometheus/data/ 

         若要实现数据持久化存储,可使用influxdb数据库

         参考链接:Prometheus(普罗米修斯)监控系统_普罗米修斯监控-CSDN博客

3.2  搭建node_exporter

Linux 虚机

node_exporter下载地址: Releases · prometheus/node_exporter · GitHub

安装步骤:

1、解压安装包并重命名文件夹
tar xf node_exporter-1.6.1.linux-amd64.tar.gz 
mv node_exporter-1.6.1.linux-amd64 node_exporter
cd node_exporter
2、以后台进程方式启动node_exporter服务
nohup ./node_exporter &
3、查看node_exporter服务是否成功启动
ps -ef |grep node
tail -f nohup.out
4、查看端口是否启动
lsof -i:9100

实现效果:默认监听端口为9100,访问url:http://ip:9100/metrics

window虚机

node_exporter下载地址:Releases · prometheus-community/windows_exporter · GitHub

安装步骤:  以管理身份打开powershell,进入安装包地址,执行以下命令即可

实现效果:默认监听端口为9182,访问url:http://ip:9182/metrics

3.3  Prometheus + node_exporter 实现效果

编辑 /usr/local/prometheus/prometheus.yml文件,新增被监控虚机配置信息 ,格式如下:

  - job_name: "LinuxClient"
    static_configs:
    - targets: ['ip:port']

[root@test prometheus]# 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']- job_name: "LinuxClient"static_configs:- targets: ['10.241.102.90:9100']- job_name: "WindowsClient"static_configs:- targets: ['10.241.101.117:9182']

 编辑prometheus.yml文件后,需重启prometheus服务才能使配置生效

systemctl restart prometheus
systemctl status prometheus

 浏览器访问http://ip:9090/targets  , 其中ip表示prometheus所在的主服务器ip。

从上图中可以看到linux 虚机和window虚机监控正常

3.4  搭建Prometheus + Grafana +  node_exporter 实现可视化监控

安装方式1:yum install  grafana   

安装方式2:通过下载Grafana rpm包手动安装

下载地址:Download Grafana | Grafana Labs

[root@Grafana ~]# wget https://dl.grafana.com/oss/release/grafana-10.4.1-1.x86_64.rpm
[root@Grafana ~]# yum -y localinstall grafana-10.4.1-1.x86_64.rpm
[root@Grafana ~]# systemctl enable --now grafana-server
[root@Grafana ~]# netstat -anpt | grep 3000

3.4.1 Grafana 成功搭建的效果:

浏览器通过ip:3000方式访问,首次访问需要登录(账号和密码均为admin),并要求修改密码

3.4.2  添加数据源 :数据类型 (Prometheus) + url

3.4.3 import导入模板

模板地址:https://grafana.com/grafana/dashboards

例如使用如下模板,可在红色框内点击获取dashboard ID (联网推荐方式) 或下载 json文件   (离线使用,本文采用方式)

linux node-exporter 模板id :11074

11074 模板地址:Node Exporter Dashboard EN 20201010-StarsL.cn | Grafana Labs

红色框上有数据源和依赖插件要求,若不满足,则无法正常展示数据

windows node-exporter 模板id:10467

10467 模板地址:Windows Exporter Dashboard 20230531-StarsL.cn | Grafana Labs

上传模板json文件 

创建一个新名称和选择3.4.2 创建的对应的Prometheus

3.4.4  查看实际数据展示效果

linux 虚机:

window虚机:

4、问题总结

4.1、提示插件找不到

 原因:采用的grafana-6.1.4-1.x86_64.rpm 版本太低,没有集成部分插件

办法1:采用高版本的grafana   (推荐)

下载地址:Download Grafana | Grafana Labs

或直接通过yum install  grafana方式安装

方法2:安装指定插件

参考链接:Grafana使用杂记(一)-- 缺少图表插件_grafana找不到bar chart插件-CSDN博客

4.2、部分指标显示无数据

解决办法:切换其他模板  (人生苦短,绕过bug)

5、未来规划

以docker方式部署以上工具,方便在不同平台之间移植使用,待续~

http://www.tj-hxxt.cn/news/106869.html

相关文章:

  • 网页设计网站源代码广东seo网络培训
  • 与做网站有关的参考文献百度竞价是什么
  • 河池网站建设服务个人如何注册网址
  • 建设银行网站登录上海谷歌seo
  • 网站书店架构书怎么做互联网营销工具
  • 测试本机与网站连接应该怎么做推广管理
  • 使用wordpress搭建博客seo中国官网
  • 哪里有网站开发团队国际重大新闻
  • 如何做jquery音乐网站市场营销的对象有哪些
  • 武汉做医院网站公司电话营口建网站的公司
  • 公司网站建设需要要求什么软件苏州seo网站公司
  • 个人可以做几个网站新东方在线教育平台官网
  • wordpress服務器google搜索排名优化
  • 起名网站开发网络销售平台排名
  • ps如何做网站轮播图短视频推广平台有哪些
  • 网站开发建设准备工作宁波seo优化报价多少
  • asp古典网站源码免费搜索引擎入口
  • 广州建设网站服务免费可用的网站源码
  • 会网站建设好吗网络营销策划书范文模板
  • 云南文山网站建设制作网站服务公司
  • 咸阳市网站建设公司网上全网推广
  • 模板网站跟仿站的区别谷歌浏览器官方app下载
  • 通化网站建设优化好搜移动端关键词快速排名
  • 做网站必须学php吗seo是什么平台
  • 临沂做网站建设的公司中国免费网站服务器2020
  • 2014年沈阳建设银行网站aso应用优化
  • 福州网站开发大概费用seo优化内容
  • 湖北政府门户网站建设研究百度电话怎么转人工
  • 打开连接 wordpressseo排名需要多少钱
  • 做50个网站bt磁力