国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

配置node_exporter

這篇具有很好參考價(jià)值的文章主要介紹了配置node_exporter。希望對大家有所幫助。如果存在錯(cuò)誤或未考慮完全的地方,請大家不吝賜教,您也可以點(diǎn)擊"舉報(bào)違法"按鈕提交疑問。

在Prometheus的架構(gòu)設(shè)計(jì)中,PrometheusServer并不直接服務(wù)監(jiān)控特定的目標(biāo),其主要任務(wù)負(fù)責(zé)數(shù)據(jù)的收集,存儲(chǔ)并且對外提供數(shù)據(jù)查詢支持。因此為了能夠能夠監(jiān)控到某些東西,如主機(jī)的CPU使用率,我們需要使用到Exporter。Prometheus周期性的從Exporter暴露的HTTP服務(wù)地址(通常是/metrics)拉取監(jiān)控樣本數(shù)據(jù)。

從上面的描述中可以看出Exporter可以是一個(gè)相對開放的概念,其可以是一個(gè)獨(dú)立運(yùn)行的程序獨(dú)立于監(jiān)控目標(biāo)以外,也可以是直接內(nèi)置在監(jiān)控目標(biāo)中。只要能夠向Prometheus提供標(biāo)準(zhǔn)格式的監(jiān)控樣本數(shù)據(jù)即可。

這里為了能夠采集到主機(jī)的運(yùn)行指標(biāo)如CPU, 內(nèi)存,磁盤等信息。我們可以使用Node Exporter 。

node_exporter安裝部署

配置hosts文件解析并修改主機(jī)名(在Prometheus ,node1,node2都要配置)Prometheus安裝文檔

[root@locathost ~]#  vim /etc/hosts
192.168.100.100 prometheus
192.168.100.10 node2
192.168.100.9 node2

修改主機(jī)名
Prometheus服務(wù)器
[root@prometheus ~]# hostnamectl set-hostname prometheus

node1 node2
[root@node1 ~]#   hostnamectl set-hostname node1
[root@node2 ~]#   hostnamectl set-hostname node2

配置時(shí)間服務(wù)器同步時(shí)間

prometheus服務(wù)器
[root@prometheus ~]# yum -y install ntp ntpdate
[root@prometheus ~]# sed -i '/^server/s/^/#/g' /etc/ntp.conf
[root@prometheus ~]# cat <<END >>/etc/ntp.conf
 server 127.127.1.0
 fudge 127.127.1.0 stratum 8
 END
[root@prometheus ~]# systemctl enable ntpd --now
[root@prometheus ~]# ntpdate ntp1.aliyun.com

node服務(wù)器(node1和node2配置相同再此只拿node1舉栗子)
[root@node1 ~]# yum -y install ntpdate
[root@node1 ~]# /usr/sbin/ntpdate 192.168.100.100

下載node_exporter(node1和node2配置相同再此只拿node1舉栗子) Prometheus官網(wǎng)

[root@node1 ~]# tar  zxvf node_exporter-1.5.0.linux-amd64.tar.gz 
[root@node1 ~]# mv node_exporter-1.5.0.linux-amd64 /usr/local/exporter

配置系統(tǒng)啟動(dòng)腳本
[root@node1 ~]# vim /usr/lib/systemd/system/node_exporter.service
[Unit]
Description=node_exporter
After=network.target

[Service]
User=prometheus
Group=prometheus
ExecStart=/usr/local/exporter/node_exporter  --web.listen-address=:20001 --collector.systemd  --collector.systemd.unit-whitelist=(sshd|nginx).service  --collector.processes  --collector.tcpstat
[Install] 
WantedBy=multi-user.target

[root@node1 ~]# useradd  -M -s /sbin/nologin prometheus
[root@node1 ~]# chown -R prometheus:prometheus /usr/local/exporter/

[root@node1 ~]# systemctl enable --now node_exporter
[root@node1 ~]# systemctl status node_exporter.service 

[root@node2 ~]# firewall-cmd --add-port=20001/tcp --permanent 
[root@node2 ~]# firewall-cmd --reload 

訪問192.168.100.9:20001 192.168.100.10:20001可以看到這個(gè)頁面

node_exporter,linux,運(yùn)維,centos,Powered by 金山文檔
node_exporter,linux,運(yùn)維,centos,Powered by 金山文檔

初始Node Exporter監(jiān)控指標(biāo)

訪問http://192.168.100.10/metrics,可以看到當(dāng)前node exporter獲取到的當(dāng)前主機(jī)的所有監(jiān)控?cái)?shù)據(jù),如下所示:

node_exporter,linux,運(yùn)維,centos,Powered by 金山文檔

每一個(gè)監(jiān)控指標(biāo)之前都會(huì)有一段類似于如下形式的信息:

  1. # HELP node_cpu Seconds the cpus spent in each mode.

  1. # TYPE node_cpu counter

  1. node_cpu{cpu="cpu0",mode="idle"} 362812.7890625

  1. # HELP node_load1 1m load average.

  1. # TYPE node_load1 gauge

  1. node_load1 3.0703125

其中HELP用于解釋當(dāng)前指標(biāo)的含義,TYPE則說明當(dāng)前指標(biāo)的數(shù)據(jù)類型。在上面的例子中node_cpu的注釋表明當(dāng)前指標(biāo)是cpu0上idle進(jìn)程占用CPU的總時(shí)間,CPU占用時(shí)間是一個(gè)只增不減的度量指標(biāo),從類型中也可以看出node_cpu的數(shù)據(jù)類型是計(jì)數(shù)器(counter),與該指標(biāo)的實(shí)際含義一致。又例如node_load1該指標(biāo)反映了當(dāng)前主機(jī)在最近一分鐘以內(nèi)的負(fù)載情況,系統(tǒng)的負(fù)載情況會(huì)隨系統(tǒng)資源的使用而變化,因此node_load1反映的是當(dāng)前狀態(tài),數(shù)據(jù)可能增加也可能減少,從注釋中可以看出當(dāng)前指標(biāo)類型為儀表盤(gauge),與指標(biāo)反映的實(shí)際含義一致。

除了這些以外,在當(dāng)前頁面中根據(jù)物理主機(jī)系統(tǒng)的不同,你還可能看到如下監(jiān)控指標(biāo):

  • node_boot_time:系統(tǒng)啟動(dòng)時(shí)間

  • node_cpu:系統(tǒng)CPU使用量

  • nodedisk*:磁盤IO

  • nodefilesystem*:文件系統(tǒng)用量

  • node_load1:系統(tǒng)負(fù)載

  • nodememeory*:內(nèi)存使用量

  • nodenetwork*:網(wǎng)絡(luò)帶寬

  • node_time:當(dāng)前系統(tǒng)時(shí)間

  • go_*:node exporter中g(shù)o相關(guān)指標(biāo)

  • process_*:node exporter自身進(jìn)程相關(guān)運(yùn)行指標(biāo)

配置prometheus采集node端信息

為了能夠讓PrometheusServer能夠從當(dāng)前node exporter獲取到監(jiān)控?cái)?shù)據(jù),這里需要修改Prometheus配置文件。編輯prometheus.yml并在scrape_configs節(jié)點(diǎn)下添加以下內(nèi)容:

[root@prometheus ~]# vim /usr/local/prometheus/prometheus.yml
- job_name: "node"
  static_configs:
     - targets:
       - "192.168.100.9:20001"
       - "192.168.100.10:20001"

###注意格式?。?!

[root@prometheus ~]# systemctl restart prometheus
[root@prometheus ~]# systemctl status prometheus

查看集成

node_exporter,linux,運(yùn)維,centos,Powered by 金山文檔
node_exporter,linux,運(yùn)維,centos,Powered by 金山文檔

使用PromQL查詢監(jiān)控?cái)?shù)據(jù)

Prometheus UI是Prometheus內(nèi)置的一個(gè)可視化管理界面,通過Prometheus UI用戶能夠輕松的了解Prometheus當(dāng)前的配置,監(jiān)控任務(wù)運(yùn)行狀態(tài)等。通過Graph面板,用戶還能直接使用PromQL實(shí)時(shí)查詢監(jiān)控?cái)?shù)據(jù):

node_exporter,linux,運(yùn)維,centos,Powered by 金山文檔

PromQL是Prometheus自定義的一套強(qiáng)大的數(shù)據(jù)查詢語言,除了使用監(jiān)控指標(biāo)作為查詢關(guān)鍵字以為,還內(nèi)置了大量的函數(shù),幫助用戶進(jìn)一步對時(shí)序數(shù)據(jù)進(jìn)行處理。例如使用rate()函數(shù),可以計(jì)算在單位時(shí)間內(nèi)樣本數(shù)據(jù)的變化情況即增長率,因此通過該函數(shù)我們可以近似的通過CPU使用時(shí)間計(jì)算CPU的利用率:

  1. rate(node_cpu_seconds_total[2m])

node_exporter,linux,運(yùn)維,centos,Powered by 金山文檔

這時(shí)如果要忽略是哪一個(gè)CPU的,只需要使用without表達(dá)式,將標(biāo)簽CPU去除后聚合數(shù)據(jù)即可

avg without(cpu) (rate(node_cpu_seconds_total[2m]))文章來源地址http://www.zghlxwxcb.cn/news/detail-694211.html

node_exporter,linux,運(yùn)維,centos,Powered by 金山文檔

到了這里,關(guān)于配置node_exporter的文章就介紹完了。如果您還想了解更多內(nèi)容,請?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來自互聯(lián)網(wǎng)用戶投稿,該文觀點(diǎn)僅代表作者本人,不代表本站立場。本站僅提供信息存儲(chǔ)空間服務(wù),不擁有所有權(quán),不承擔(dān)相關(guān)法律責(zé)任。如若轉(zhuǎn)載,請注明出處: 如若內(nèi)容造成侵權(quán)/違法違規(guī)/事實(shí)不符,請點(diǎn)擊違法舉報(bào)進(jìn)行投訴反饋,一經(jīng)查實(shí),立即刪除!

領(lǐng)支付寶紅包贊助服務(wù)器費(fèi)用

相關(guān)文章

  • 【監(jiān)控】Linux部署postgres_exporter及PG配置(非Docker)

    【監(jiān)控】Linux部署postgres_exporter及PG配置(非Docker)

    下載地址 選一個(gè)amd64下載 上傳至服務(wù)器,解壓 進(jìn)入解壓后的目錄 建立停止腳本 stop.sh 。注意unix編碼 啟動(dòng)腳本start.sh 后面會(huì)建立postgres_exporter用戶,密碼為password –web.listen-address為監(jiān)聽的端口 –extend.query-path為自定義查詢的文件 先根據(jù)命令在服務(wù)器上找到配置文件在哪 修改

    2024年02月09日
    瀏覽(20)
  • 【大數(shù)據(jù)監(jiān)控】Prometheus、Node_exporter、Graphite_exporter安裝部署詳細(xì)文檔

    【大數(shù)據(jù)監(jiān)控】Prometheus、Node_exporter、Graphite_exporter安裝部署詳細(xì)文檔

    Prometheus是一個(gè)開源的系統(tǒng)監(jiān)控和報(bào)警系統(tǒng),現(xiàn)在已經(jīng)加入到CNCF基金會(huì),成為繼k8s之后第二個(gè)在CNCF托管的項(xiàng)目,在kubernetes容器管理系統(tǒng)中,通常會(huì)搭配prometheus進(jìn)行監(jiān)控,同時(shí)也支持多種exporter采集數(shù)據(jù),還支持pushgateway進(jìn)行數(shù)據(jù)上報(bào),Prometheus性能足夠支撐上萬臺(tái)規(guī)模的集群。

    2023年04月08日
    瀏覽(74)
  • Prometheus監(jiān)控實(shí)戰(zhàn)之node_exporter詳解

    Prometheus監(jiān)控實(shí)戰(zhàn)之node_exporter詳解

    目錄 1 概述 2 功能 2.1 不同操作系統(tǒng)采集端 2.2?linux操作系統(tǒng)采集端 2.3 監(jiān)控指標(biāo) 2.4 參數(shù)定義 2.4.1?默認(rèn)啟用的參數(shù) ?2.4.2?默認(rèn)不啟用的參數(shù) 2.5 啟動(dòng)參數(shù) 3 安裝部署 3.1?下載 3.2?安裝配置 3.3 測試驗(yàn)證 3.4 prometheus配置 3.5?在 grafana 中添加圖表? ?Exporter是Prometheus的指標(biāo)數(shù)據(jù)收

    2024年02月03日
    瀏覽(27)
  • Kibana+Prometheus+node_exporter 監(jiān)控告警部署

    Kibana+Prometheus+node_exporter 監(jiān)控告警部署

    下載好三個(gè)軟件包 一、prometheus安裝部署 1、解壓 ?2、修改配置文件的IP地址 3、運(yùn)行Prometheus 4、打開瀏覽器根據(jù)配置文件的地址和端口訪問,如果狀態(tài)欄看到的跟下圖不一樣,記得在標(biāo)簽欄中的Status狀態(tài)選擇Targets ?二、node_exporter 安裝部署 1、解壓,運(yùn)行 ?2、打開瀏覽器輸入

    2024年02月15日
    瀏覽(20)
  • docker-compose安裝node-exporter, prometheus, grafana

    exporter提供監(jiān)控?cái)?shù)據(jù) prometheus拉取監(jiān)控?cái)?shù)據(jù) grafana可視化監(jiān)控?cái)?shù)據(jù) 全部操作在 /root/mypromethus 中執(zhí)行 node-exporter.yaml dcprometheus.yaml prometheus_cnf/prometheus.yml grafana.yaml prometheus和grafana目錄權(quán)限問題 https://blog.csdn.net/qingwufeiyangxz/article/details/108659681 https://grafana.com/grafana/dashboards

    2024年02月11日
    瀏覽(22)
  • (mac)Prometheus監(jiān)控之Node_exporter(CPU、內(nèi)存、磁盤、網(wǎng)絡(luò)等)

    (mac)Prometheus監(jiān)控之Node_exporter(CPU、內(nèi)存、磁盤、網(wǎng)絡(luò)等)

    1.啟動(dòng) Prometheus 普羅米修斯? 瀏覽器訪問? http://localhost:9090/targets ?2.啟動(dòng)Node_exporter? 訪問: http://localhost:9100 ?? 3.啟動(dòng)grafana 訪問 http://localhost: 3000? 4.添加數(shù)據(jù)源 5.查看Dashboard? ?普羅米修斯是后端數(shù)據(jù)監(jiān)控平臺(tái),通過Node_exporter收集數(shù)據(jù),Grafana將數(shù)據(jù)用圖形的方式展示出來

    2024年04月26日
    瀏覽(30)
  • k8s集群監(jiān)控方案--node-exporter+prometheus+grafana

    k8s集群監(jiān)控方案--node-exporter+prometheus+grafana

    目錄 前置條件 一、下載yaml文件 二、部署yaml各個(gè)組件 2.1 node-exporter.yaml 2.2 Prometheus 2.3 grafana 2.4訪問測試 三、grafana初始化 3.1加載數(shù)據(jù)源 3.2導(dǎo)入模板 四、helm方式部署 安裝好k8s集群(幾個(gè)節(jié)點(diǎn)都可以,本人為了方便實(shí)驗(yàn)k8s集群只有一個(gè)master節(jié)點(diǎn)),注意prometheus是部署在k8s集群

    2024年02月12日
    瀏覽(91)
  • 運(yùn)維學(xué)習(xí)之采集器 node_exporter 1.3.1安裝并使用

    運(yùn)維學(xué)習(xí)之采集器 node_exporter 1.3.1安裝并使用

    參考《監(jiān)控系統(tǒng)部署prometheus基本功能》先完成prometheus部署。 wget https://github.com/prometheus/node_exporter/releases/download/v1.3.1/node_exporter-1.3.1.linux-amd64.tar.gz 下載壓縮包。 tar -zxf node_exporter-1.3.1.linux-amd64.tar.gz 進(jìn)行解壓。 cp node_exporter-1.3.1.linux-amd64/* /opt/prometheus/ 進(jìn)行復(fù)制。 nohup /opt/pr

    2024年02月09日
    瀏覽(21)
  • 免費(fèi)開源服務(wù)器資源監(jiān)控系統(tǒng)grafana+prometheus+node_exporter

    免費(fèi)開源服務(wù)器資源監(jiān)控系統(tǒng)grafana+prometheus+node_exporter

    有項(xiàng)目做測試的時(shí)候需要查詢服務(wù)器資源利用情況,自己又沒寫相應(yīng)的模塊,此時(shí)就需要一套好用的資源監(jiān)控系統(tǒng),,咨詢了運(yùn)維人員給推薦了一套,裝完后真的很好用。 就是grafana+prometheus+ node_exporter(linux)或者windows_exporter(wins) 具體介紹不多說: 1、grafana是對數(shù)據(jù)做展

    2024年02月12日
    瀏覽(21)
  • 助力工業(yè)物聯(lián)網(wǎng),工業(yè)大數(shù)據(jù)之服務(wù)域:node_exporter插件【三十七】_node_expoter 電源(1)

    助力工業(yè)物聯(lián)網(wǎng),工業(yè)大數(shù)據(jù)之服務(wù)域:node_exporter插件【三十七】_node_expoter 電源(1)

    小結(jié) 實(shí)現(xiàn)node_exporter插件的安裝監(jiān)控Linux指標(biāo) 07:mysqld_exportor插件 目標(biāo) : 實(shí)現(xiàn)mysqld_exportor插件的安裝監(jiān)控MySQL指標(biāo) 實(shí)施 上傳安裝 配置MySQL用戶授權(quán) 注冊服務(wù) 啟動(dòng)服務(wù) 配置Prometheus 自我介紹一下,小編13年上海交大畢業(yè),曾經(jīng)在小公司待過,也去過華為、OPPO等大廠,18年進(jìn)入

    2024年04月15日
    瀏覽(25)

覺得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請作者喝杯咖啡吧~博客贊助

支付寶掃一掃領(lǐng)取紅包,優(yōu)惠每天領(lǐng)

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包