參考《監(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/prometheus/node_exporter &> output.log &
后臺(tái)啟動(dòng)。
curl -s localhost:9100/metrics | head -n 20
看一下9100
端口前二十行輸出內(nèi)容。
在/opt/prometheus/prometheus.yml
最后添加上下邊的內(nèi)容:
- job_name: 'node_exporter'
static_configs:
- targets: ['localhost:9100']
配置告警規(guī)則
在/opt/prometheus/prometheus.yml
把下邊的內(nèi)容:
rule_files:
# - "first_rules.yml"
# - "second_rules.yml"
替換為
rule_files:
- "node_exporter.yml"
頁(yè)面查看,在頁(yè)面上點(diǎn)擊Alerts
。
顯示內(nèi)容如下圖:文章來(lái)源:http://www.zghlxwxcb.cn/news/detail-703734.html
此文章為9月Day 9學(xué)習(xí)筆記,內(nèi)容來(lái)源于極客時(shí)間《運(yùn)維監(jiān)控系統(tǒng)實(shí)戰(zhàn)筆記》。文章來(lái)源地址http://www.zghlxwxcb.cn/news/detail-703734.html
到了這里,關(guān)于運(yùn)維學(xué)習(xí)之采集器 node_exporter 1.3.1安裝并使用的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!