wget https://github.com/prometheus/prometheus/releases/download/v2.37.6/prometheus-2.37.6.linux-amd64.tar.gz
tar xvf prometheus-2.37.6.linux-amd64.tar.gz
cd prometheus-2.37.6.linux-amd64/
 ./prometheus --config /etc/prometheus/prometheus.yml
 cat  /usr/lib/systemd/system/prometheus.service
[Unit]
Description=https://prometheus.io
After=network.target

[Service]
Type=simple
#Restart=on-failure
ExecStart=/usr/bin/prometheus --config.file=/etc/prometheus/prometheus.yml --web.listen-address=:9090

[Install]
WantedBy=multi-user.target
global:
  scrape_interval:     15s
  evaluation_interval: 15s

scrape_configs:
  - job_name: 'Tensorturbo_v2'
    scrape_interval: 10s
    scrape_timeout: 5s
    static_configs:
      - targets: ['172.16.30.96:9100']
        labels:
          instance: 30.96
文档更新时间: 2023-03-28 02:29   作者:admin