zoukankan      html  css  js  c++  java
  • grafana中主机巡检

    ########################################################
      - job_name: 'netdata-scrape'
        metrics_path: '/api/v1/allmetrics'
        params:
          format: [prometheus]
        honor_labels: true
        file_sd_configs:
        - refresh_interval: 1m
          files:
          - "/data/prometheus/prometheus/conf/uat-qp.yml"
          - "/data/prometheus/prometheus/conf/uat-dy.yml"
          - "/data/prometheus/prometheus/conf/prod.yml"
          - "/data/prometheus/prometheus/conf/gcp.yml"
          - "/data/prometheus/prometheus/conf/bigdata.yml"
        relabel_configs:
          - source_labels: [__address__]
            target_label: host_ip
    ###############################################################
    包含的配置文件的配置
    - targets: ['172.18.221.62:19999']
      labels:
        instance: gitlab
        group: qp
        env: prod
    ###############################################################
    table表中的设置:
    instant:表示只显示当前值
    cpu使用率
    sum(netdata_system_cpu_percentage_average{dimension!="idle", group="$group", env="$env"}) by (instance)
    要点解释:
    dimension:维度
    idle:闲置的
    
    内存使用率
    sum(netdata_system_ram_MiB_average{dimension="used", group="$group", env="$env"}) by (instance) / sum(netdata_system_ram_MiB_average{group="$group", env="$env"}) by (instance) * 100
    
    磁盘总使用率
    sum(netdata_disk_space_GiB_average{dimension="used",group="$group",env="$env"}) by (instance) / sum(netdata_disk_space_GiB_average{group="$group", env="$env"}) by (instance) * 100
    
    
    /分区使用率
    sum(netdata_disk_space_GiB_average{dimension="used",family="/", group="$group",env="$env"}) by (instance) / sum(netdata_disk_space_GiB_average{group="$group", family="/", env="$env"}) by (instance) * 100
    
    
    /data分区使用率
    sum(netdata_disk_space_GiB_average{dimension="used",family="/data", group="$group",env="$env"}) by (instance) / sum(netdata_disk_space_GiB_average{group="$group", family="/data", env="$env"}) by (instance) * 100
  • 相关阅读:
    HO引擎近况20210912
    查询超时问题的处理
    ubuntu根据关键词批量杀进程
    创建notebook适用的虚拟环境
    信赖域策略优化(Trust Region Policy Optimization, TRPO)
    强化学习(Reinforcement Learning)
    生成对抗网络(GAN与W-GAN)
    卷积神经网络CNN
    循环神经网络RNN
    PyTorch自动求导
  • 原文地址:https://www.cnblogs.com/zhuhaofeng/p/13345526.html
Copyright © 2011-2022 走看看