prometheus監控實戰( 五 )

授權并運行腳本
chmod +x  jvm_stat_exporter.sh./jvm_stat_exporter.sh2、查看jvm指標

  • 在pushgateway查看如下圖
    prometheus監控實戰

    文章插圖
  • 在grafana查看監控指標如下
    prometheus監控實戰

    文章插圖
第五節、監控服務5.1、部署Blackbox Exporter1、安裝
tar -xvf blackbox_exporter-0.19.0.linux-amd64.tar.gzcd blackbox_exporter-0.19.0.linux-amd64/2、啟動
nohup ./blackbox_exporter &3、訪問瀏覽器訪問http://192.168.10.10:9115
5.2、監控端口1、配置promethues集成blackbox_exporter監控端口22
  - job_name: 'prometheus_port_status'    metrics_path: /probe    params:        module: [tcp_connect]    static_configs:        - targets: ['192.168.10.14:22]          labels:            instance: port_22_ssh            hostip: 192.168.10.14            group: 'tcp'    relabel_configs:        - source_labels: [__address__]          target_label: __param_target        - target_label: __address__          replacement: 192.168.10.10:91152、重啟prometheus
nohup ./prometheus --config.file=./prometheus.yml --web.listen-address=:49800 1>nohup.log 2>&1 &提示:停掉prometheus,再次啟動
5.3、監控http1、配置promethues集成blackbox_exporter監控http
  - job_name: web_status    metrics_path: /probe    params:        module: [http_2xx]    static_configs:        - targets: ['http://192.168.10.15:8080]          labels:            instance: starweb            hostip: 192.168.10.15            group: 'web'    relabel_configs:        - source_labels: [__address__]          target_label: __param_target        - target_label: __address__          replacement: 192.168.10.10:91152、重啟prometheus
nohup ./prometheus --config.file=./prometheus.yml --web.listen-address=:49800 1>nohup.log 2>&1 &提示:停掉prometheus , 再次啟動
【prometheus監控實戰】

推薦閱讀