您好,登錄后才能下訂單哦!
這篇文章主要介紹了Prometheus和NodeExporter安裝監(jiān)控?cái)?shù)據(jù)的方法的相關(guān)知識(shí),內(nèi)容詳細(xì)易懂,操作簡(jiǎn)單快捷,具有一定借鑒價(jià)值,相信大家閱讀完這篇Prometheus和NodeExporter安裝監(jiān)控?cái)?shù)據(jù)的方法文章都會(huì)有所收獲,下面我們一起來看看吧。
在https://prometheus.io/download/下載prometheus放到自定義的位置。
解壓壓縮包
創(chuàng)建data文件夾mkdir -p data
(NodeExporter是Prometheus提供的一個(gè)可以采集到主機(jī)信息的應(yīng)用程序,它能采集到機(jī)器的 CPU、內(nèi)存、磁盤等信息)
cd到目標(biāo)目錄,然后用命令下載二進(jìn)制包
curl -OL https://github.com/prometheus/node_exporter/releases/download/v1.3.1/node_exporter-1.3.1.darwin-amd64.tar.gz
解壓這個(gè)二進(jìn)制包
tar -xzf node_exporter-1.3.1.darwin-amd64.tar.gz
進(jìn)入&運(yùn)行node exporter
cd node_exporter-1.3.1.darwin-amd64 cd ..
cp node_exporter-1.3.1.darwin-amd64/node_exporter /usr/local/bin/node_exporter
運(yùn)行
cd ... cd /usr/local/bin ./node_exporter
訪問http://localhost:9100/看到
點(diǎn)擊http://localhost:9100/metrics進(jìn)去可以看到
# HELP node_cpu Seconds the cpus spent in each mode. # TYPE node_cpu counter node_cpu{cpu="cpu0",mode="idle"} 362812.7890625 # HELP node_load1 1m load average. # TYPE node_load1 gauge 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)
node_load1 該指標(biāo)反映了當(dāng)前主機(jī)在最近一分鐘以內(nèi)的負(fù)載情況 指標(biāo)類型為儀表盤(gauge)
關(guān)于“Prometheus和NodeExporter安裝監(jiān)控?cái)?shù)據(jù)的方法”這篇文章的內(nèi)容就介紹到這里,感謝各位的閱讀!相信大家對(duì)“Prometheus和NodeExporter安裝監(jiān)控?cái)?shù)據(jù)的方法”知識(shí)都有一定的了解,大家如果還想學(xué)習(xí)更多知識(shí),歡迎關(guān)注億速云行業(yè)資訊頻道。
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。