Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Prometheus03-node_exporter

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

1. Address

Working with documents: https://prometheus.io/docs/guides/node-exporter/GitHub: https://github.com/prometheus/node_exporterexporter list: https://prometheus.io/docs/instrumenting/exporters/

two。 download

Wget https://github.com/prometheus/node_exporter/releases/download/v0.18.1/node_exporter-0.18.1.linux-amd64.tar.gz

3. Install and start

Mv node_exporter-0.18.1.linux-amd64 / usr/local/node_ exporter [root @ zabbix-server system] # cat node_ exporter.service [Unit] Description=node_exporterDocumentation= https://prometheus.io/After=network.target[Service]Type=simpleUser=prometheusExecStart=/usr/local/node_exporter/node_exporterRestart=on-failure[Install]WantedBy=multi-user.target[root@zabbix-server system] # pwd/usr/lib/systemd/system [root@zabbix-server system] # systemctl daemon-reloadsystemctl start node_exporter

4. View metrics

Http://192.168.249.10:9100/metrics

5. Prometheus loads node_exporter into it

[root@zabbix-proxy sd_config] # cat prometheus-server.yml-labels: service: prometheus idc: su project: monitor targets:-192.168.249.11 Set the scrape interval to every 9100 [root@zabbix-proxy sd_config] # cat.. / prometheus.yml# my global configglobal: 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 configurationalerting: 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= `to any timeseries scraped from this config. -job_name: 'prometheus' file_sd_configs:-files: [' / usr/local/prometheus/sd_config/*.yml'] refresh_interval: 5s [root@zabbix-proxy sd_config] #

6. View

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report