中文亚洲精品无码_熟女乱子伦免费_人人超碰人人爱国产_亚洲熟妇女综合网

當(dāng)前位置: 首頁 > news >正文

云技術(shù)在網(wǎng)站建設(shè)中的應(yīng)用免費(fèi)網(wǎng)絡(luò)推廣軟件

云技術(shù)在網(wǎng)站建設(shè)中的應(yīng)用,免費(fèi)網(wǎng)絡(luò)推廣軟件,網(wǎng)站制作注意事項(xiàng),企業(yè)更新網(wǎng)站的好處前提環(huán)境: Docker環(huán)境 涉及參考文檔: 安裝Prometheus開始 Prometheusnode_exporter Agent組件 一、部署Prometheus 1、啟動容器將文件拷貝出來 docker run -d prom/prometheus2、容器將文件拷貝出來 docker cp 容器ID:/usr/share/prometheus/conso…

前提環(huán)境:

  • Docker環(huán)境

涉及參考文檔:

  • 安裝Prometheus
  • 開始 Prometheus
  • node_exporter Agent組件

一、部署Prometheus

1、啟動容器將文件拷貝出來
docker run -d prom/prometheus
2、容器將文件拷貝出來
 docker cp 容器ID:/usr/share/prometheus/console_libraries /usr/share/prometheus/docker cp 容器ID:/usr/share/prometheus/consoles/ /usr/share/prometheus/docker cp 容器ID:/etc/prometheus /data/docker_data/Promthues/confdocker cp 容器ID:/prometheus /data/docker_data/Promthues/data
3、修改數(shù)據(jù)存儲權(quán)限。 默認(rèn)容器中是nobody:nobody 只能修改為777
chmod  777 /data/docker_data/Promthues/data
4、啟動docker
docker run --name prometheus -d \
-v /data/docker_data/Promthues/data:/prometheus \
-v /data/docker_data/Promthues/conf:/etc/prometheus \
-p 9090:9090 prom/prometheus \
--config.file=/etc/prometheus/prometheus.yml \
--web.listen-address="0.0.0.0:9090" \
--storage.tsdb.path=/prometheus \
--web.console.libraries=/usr/share/prometheus/console_libraries \
--web.console.templates=/usr/share/prometheus/consoles \
--storage.tsdb.retention=30d \
--web.enable-lifecycle

二、訪問WEB控制臺

訪問URL    IP+9090

在這里插入圖片描述

三、安裝node_exporter 組件

docker run -d --name node_exporter \--restart=always \--net="host" \--pid="host" \-v "/proc:/host/proc:ro" \-v "/sys:/host/sys:ro" \-v "/:/rootfs:ro" \prom/node-exporter \--path.procfs=/host/proc \--path.rootfs=/rootfs \--path.sysfs=/host/sys \--collector.textfile.directory=/data/docker_data/Promthues/prom \--collector.filesystem.ignored-mount-points='^/(sys|proc|dev|host|etc)($$|/)'

四、配置 Prometheus 以監(jiān)視自身

global:  #全局scrape_interval:     15s   # 默認(rèn)情況下即拉取業(yè)務(wù)監(jiān)控數(shù)據(jù)的間隔時間,默認(rèn)一分鐘scrape_timeout:  10s       # 即拉取業(yè)務(wù)監(jiān)控數(shù)據(jù)接口的超時時間evaluation_interval: 15s  # 默認(rèn)評估規(guī)則的頻率,默認(rèn)一分鐘# Attach these labels to any time series or alerts when communicating with# external systems (federation, remote storage, Alertmanager).external_labels:monitor: 'codelab-monitor'scrape_configs:# The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.- job_name: 'prometheus'# Override the global default and scrape targets from this job every 5 seconds.scrape_interval: 5sstatic_configs:- targets: ['localhost:9090']labels:name: Prometheus

五、控制臺抓取數(shù)據(jù)

1、重新查看當(dāng)前Prometheus的標(biāo)簽

在這里插入圖片描述

2、重新查看當(dāng)前Prometheus的標(biāo)簽
avg by (job, instance, mode) (rate(node_cpu_seconds_total{instance="10.1.32.231"}[5m]))

在這里插入圖片描述

3、修改Prometheus 主配置文件
mkdir -p /data/docker_data/Promthues/conf/rules
global:  #全局scrape_interval:     15s   # 默認(rèn)情況下即拉取業(yè)務(wù)監(jiān)控數(shù)據(jù)的間隔時間,默認(rèn)一分鐘scrape_timeout:  10s       # 即拉取業(yè)務(wù)監(jiān)控數(shù)據(jù)接口的超時時間evaluation_interval: 15s  # 默認(rèn)評估規(guī)則的頻率,默認(rèn)一分鐘# Attach these labels to any time series or alerts when communicating with# external systems (federation, remote storage, Alertmanager).external_labels:monitor: 'codelab-monitor'rule_files:- "rules/*.yml"    # 指定自定義規(guī)則文件存放目錄scrape_configs:# The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.- job_name: 'prometheus'# Override the global default and scrape targets from this job every 5 seconds.scrape_interval: 5sstatic_configs:- targets: ['localhost:9090']labels:name: Prometheus

4、配置Prometheus記錄規(guī)則

vim /data/docker_data/Promthues/conf/rules/cpu-node.yml
groups:
- name: cpu-noderules:- record: job_instance_mode:node_cpu_seconds:avg_rate5mexpr: avg by (job, instance, mode) (rate(node_cpu_seconds_total{instance="10.1.32.231"}[5m]))

5、熱加載Prometheus 服務(wù)

檢查語法是否符合

docker exec -it prometheus promtool check config /etc/prometheus/prometheus.ym

熱加載配置文件

curl -XPOST http://localhost:9090/-/reload

6、重新登錄Web控制臺

在這里插入圖片描述
點(diǎn)擊匹配規(guī)則,自動跳轉(zhuǎn)到Web 查詢界面
在這里插入圖片描述

匹配規(guī)則作為告警閾值進(jìn)行釘釘通知告警, 后面篇章會記錄學(xué)習(xí)筆記。

http://www.risenshineclean.com/news/4437.html

相關(guān)文章:

  • 模板手機(jī)網(wǎng)站建設(shè)公司濟(jì)南百度推廣優(yōu)化
  • 招遠(yuǎn)建網(wǎng)站中國今天剛剛發(fā)生的新聞
  • 壽陽網(wǎng)站建設(shè)哈爾濱網(wǎng)絡(luò)推廣優(yōu)化
  • 想要找個網(wǎng)站做環(huán)評公示剛剛中國宣布重大消息
  • 讀書網(wǎng)站如何做職業(yè)技能培訓(xùn)網(wǎng)
  • wap網(wǎng)站開發(fā) php網(wǎng)上銷售方法
  • 美妝網(wǎng)站建設(shè)環(huán)境分析人工在線客服系統(tǒng)
  • 做網(wǎng)站需要技術(shù)查詢關(guān)鍵詞排名軟件
  • 做網(wǎng)站的主機(jī)配置推銷產(chǎn)品怎么推廣
  • 海鹽市網(wǎng)站建設(shè)株洲專業(yè)seo優(yōu)化
  • 怎樣用c語言做網(wǎng)站北京seo推廣系統(tǒng)
  • 華為外包做的網(wǎng)站現(xiàn)在推廣引流什么平臺比較火
  • 湖北省利川市建設(shè)局網(wǎng)站企業(yè)網(wǎng)站優(yōu)化
  • 做網(wǎng)站排名工具如何讓產(chǎn)品吸引顧客
  • 可做區(qū)域代理的網(wǎng)站seo咨詢師
  • 泉州做網(wǎng)站的網(wǎng)上推廣渠道有哪些
  • 網(wǎng)絡(luò)營銷以什么為中心官網(wǎng)seo哪家公司好
  • 可以免費(fèi)進(jìn)入的網(wǎng)站正能量域名網(wǎng)址關(guān)鍵詞查詢網(wǎng)站
  • 在線下單網(wǎng)站怎么做網(wǎng)站seo診斷
  • 專業(yè)網(wǎng)站設(shè)計推薦百度云資源搜索
  • 給網(wǎng)站做引流多少錢2023年中國進(jìn)入一級戰(zhàn)備狀態(tài)了嗎
  • 怎么做網(wǎng)站編程高質(zhì)量外鏈
  • 嘉興個人建站seo主要做什么工作
  • 我的世界做指令的網(wǎng)站網(wǎng)站優(yōu)化的方式有哪些
  • 怎么查看網(wǎng)站根目錄深圳seo排名哪家好
  • 石家莊招聘哪個網(wǎng)站做的好公司軟文推廣
  • 展廳設(shè)計策劃方案南寧正規(guī)的seo費(fèi)用
  • 公司企業(yè)網(wǎng)站的選擇seo專員工作內(nèi)容
  • 網(wǎng)站免費(fèi)空間免備案培訓(xùn)機(jī)構(gòu)學(xué)校
  • 百度搜索引擎收錄入口seo銷售好做嗎