zoukankan      html  css  js  c++  java
  • promethus监控结构

    参考:https://www.cnblogs.com/wangshuyang/p/11641316.html

    prometheus组件

    • /usr/local/prometheus/ #数据汇总
    • /usr/local/alertmanager/ #报警
    • /usr/local/exporter/node_exporter/ #数据采集
    • /usr/local/prometheus-webhook-dingtalk/ #把报警信息格式化为dingding的要求格式

    1)/usr/local/prometheus/的常见命令

    • ./promtool check config prometheus.yml 
    • cat /usr/local/prometheus/prometheus.yml 

    • # /usr/lib/systemd/system/prometheus.service
      [Unit]
      Description=prometheus
      Documentation=https://prometheus.io/
      After=network.target 
      
      [Service]
      Restart=on-failure
      ExecStart=/usr/local/prometheus/prometheus
              --config.file=/usr/local/prometheus/prometheus.yml
              --storage.tsdb.path=/prometheus/data/ 
      
      [Install]
      WantedBy=multi-user.target
      View Code
    • /usr/local/prometheus/rules/my_rules.yml

    • adfa
    • afas
    •  /usr/local/prometheus/sd_config/backend_sd_config.json

     

    2)/usr/local/alertmanager/ #报警

    • ./amtool check-config alertmanager.yml 
    • cat /usr/local/alertmanager/alertmanager.yml 

    • # /usr/lib/systemd/system/alertmanager.service
      [Unit]
      Description=alertmanager
      Documentation=https://prometheus.io/
      After=network.target 
      
      [Service]
      Restart=on-failure
      ExecStart=/usr/local/alertmanager/alertmanager
                --config.file=/usr/local/alertmanager/alertmanager.yml
      [Install]
      WantedBy=multi-user.target
      View Code
    • afdaf
    • afdqa

     3) /usr/local/exporter/node_exporter/ #数据采集

    • [root@prometheus ~]# cat /usr/local/exporter/node_exporter/config.yml 
      basic_auth_users:
        admin: $2y$12$b6XWVL1R4xFfs.YU.QRDY7vgGwkNonEagazne
      View Code
    • # /usr/lib/systemd/system/node_exporter.service
      [Unit]
      Description=node_exporter
      Documentation=https://prometheus.io/
      After=network.target 
      
      [Service]
      Restart=on-failure
      ExecStart=/usr/local/exporter/node_exporter/node_exporter
                --web.listen-address=:61921
      [Install]
      WantedBy=multi-user.target
      View Code
    • /usr/local/exporter/node_exporter/node_exporter

    • afda 
  • 相关阅读:
    ZOJ 1002 Fire Net (火力网)
    UVa OJ 117 The Postal Worker Rings Once (让邮差只走一圈)
    UVa OJ 118 Mutant Flatworld Explorers (变体扁平世界探索器)
    UVa OJ 103 Stacking Boxes (嵌套盒子)
    UVa OJ 110 MetaLoopless Sorts (无循环元排序)
    第一次遇到使用NSNull的场景
    NSURL使用浅析
    从CNTV下载《小小智慧树》
    NSDictionary and NSMutableDictionary
    Category in static library
  • 原文地址:https://www.cnblogs.com/faberbeta/p/13519283.html
Copyright © 2011-2022 走看看