首页 > 其他分享 >test

test

时间:2023-06-07 19:57:12浏览次数:27  
标签:node module grafana prometheus ----- pushgateway test

  • 服务或者应用部署在服务器上,prometheus对服务器进行数据采集,通过Grafana展示前端效果,告警信息通过其他组件发送给接收人

  • 特点

    • 核心部分仅为二进制文件,只需要一个磁盘
    • 主动拉取信息
    • 服务发现动态监管
    • 数据处理高效
    • 内置数据查询
  • 架构

    • 存储计算
      • prometheus server层
      • tsdb数据存储
      • retrieval拉取数据,取数组件
      • Service discovery,可以动态发现要监控的目标
    • 采集
      • 短作业:直接通过 API,在退出时间指标推送给 Pushgateway。
      • 长作业:Retrieval 组件直接从 Job 或者 Exporter 拉取数据。
    • 应用
      • AlertManage付费报警系统
      • Grafana可视化
  • 启动

    • ./prometheus --config.file=prometheus.yml > ./prometheus.log 2>&1 &
    • ./node_exporter
    • ./pushgateway --web.listen-address :9091 > ./pushgateway.log 2>&1 &
    • ./alertmanager --config.file=alertmanager.yml > ./alertmanager.log 2>&1 &
    • ./bin/grafana-server web > ./grafana.log 2>&1 &
  • promql

    • 直接查询瞬时向量
      • node_netstat_Tcp_RetransSegs{job="node exporter"}
    • 区间向量
      • node_netstat_Tcp_RetransSegs{job="node exporte"}[5h]
    • 位移
      • node_netstat_Tcp_RetransSegs{job="node exporter"} offset 1d
    • 聚合操作
      • sum (node_netstat_Tcp_RetransSegs{job="node exporter"})
  • grafana

    • 手动创建仪表盘
      • 选择数据源
      • 添加查询条件
    • 导入仪表盘
      • 在grafana下载dashboard仪表盘导入
  • 脚本

    • #!/bin/bash
      case $1 in
      "start"){
       echo '----- 启动 prometheus -----'
       nohup /opt/module/prometheus-2.29.1/prometheus --web.enable-admin-api
      --config.file=/opt/module/prometheus-2.29.1/prometheus.yml > 
      /opt/module/prometheus-2.29.1/prometheus.log 2>&1 &
       echo '----- 启动 pushgateway -----'
       nohup /opt/module/pushgateway-1.4.1/pushgateway --web.listen-address :9091 > 
      /opt/module/pushgateway-1.4.1/pushgateway.log 2>&1 &
       echo '----- 启动 grafana -----'
       nohup /opt/module/grafana-8.1.2/bin/grafana-server --homepath 
      /opt/module/grafana-8.1.2 web > /opt/module/grafana-8.1.2/grafana.log 2>&1 &
      };;
      "stop"){
       echo '----- 停止 grafana -----'
       pgrep -f grafana | xargs kill
       echo '----- 停止 pushgateway -----'
       pgrep -f pushgateway | xargs kill
       echo '----- 停止 prometheus -----'
       pgrep -f prometheus | xargs kill
      };;
      esac
      
      chmod +x flink-monitor.sh
      

标签:node,module,grafana,prometheus,-----,pushgateway,test
From: https://www.cnblogs.com/wangpc/p/17464386.html

相关文章

  • pytest + yaml 框架 -32.re 正则解析返回结果
    前言pytest-yaml-yoyo插件可以支持3种表达式提取接口返回结果,jsonpath和jmespath适合解析返回的json数据。非json数据的结果可以用re正则表达式取值。re正则取值访问我的博客地址https://www.cnblogs.com/yoyoketang/test_re.yml用例文件内容#上海悠悠wx:2833404......
  • pytest 前置后置使用方法
    在我们某一系列用例运行前,我们需要做一些准备工作。这样的行为势必会产生大量的重复代码.那么在这种情况下,pytest给我们提供了丰富的前置和后置的方法pytest里包含了setUp和teardown对应的内容用例运行级别模块级(setupmodule/teardownmodule):开始于模块的始末,全局的函数级(......
  • 通过状态机方法实现基于FPGA的维特比译码器,包含testbench测试文件
    1.算法仿真效果vivado2019.2仿真结果如下:2.算法涉及理论知识概要viterbi译码算法是一种卷积码的解码算法。优点不说了。缺点就是随着约束长度的增加算法的复杂度增加很快。约束长度N为7时要比较的路径就有64条,为8时路径变为128条。(2<<(N-1))。所以viterbi译码一般应用在约束......
  • 通过状态机方法实现基于FPGA的维特比译码器,包含testbench测试文件
    1.算法仿真效果vivado2019.2仿真结果如下: 2.算法涉及理论知识概要       viterbi译码算法是一种卷积码的解码算法。优点不说了。缺点就是随着约束长度的增加算法的复杂度增加很快。约束长度N为7时要比较的路径就有64条,为8时路径变为128条。(2<<(N-1))。所以viterbi......
  • API全场景零码测试机器人,华为云发布ATGen in CodeArts TestPlan
    摘要:华为云ATGen现开放对外邀测,欢迎预约。本文分享自华为云社区《API全场景零码测试机器人,华为云发布ATGeninCodeArtsTestPlan》,作者:华为云头条。众所周知,软件服务及组件之间的交互主要依赖大量的API接口。以华为云300多个商用云服务为例,平均每个服务含500+接口,接口总数高......
  • cpp test write content speed to ssd and usual disk respectively 1M,10M,100M row
    #include<chrono>#include<ctime>#include<fstream>#include<iomanip>#include<iostream>#include<sstream>#include<thread>#include<uuid/uuid.h>std::stringget_time_now(){autonow=std::chro......
  • AtCoder Beginner Contest 281 Ex Alchemy
    洛谷传送门AtCoder传送门考虑设\(f_i\)为\(i\)的答案,那么:\[f_i=[x_i](1+x)^A\prod\limits_{j=2}^{i-1}(1+f_jx)\]这个东西其实是可以分治FFT的。具体地,设分治区间为\([l,r]\),要求一个\(r-l+1\)次多项式\(\prod\limits_{i=l}^r(1+f_ix)\)。......
  • Pytest+BDD
                多组数据的处理   ......
  • 【VMware】CentOS6.5 Loaded plugins: fastestmirror, refresh-packagekit, security
    最近在用Centos6.5的时候出现了这种情况,[root@bogonDesktop]#yum-yinstalldockerLoadedplugins:fastestmirror,refresh-packagekit,securityLoadingmirrorspeedsfromcachedhostfile *base:mirrors.aliyun.com *extras:mirrors.nwsuaf.edu.cn *updates:m......
  • test
    1prim算法intn; //n表示点数intg[N][N]; //邻接矩阵,存储所有边intdist[N]; //存储其他点到当前最小生成树的距离boolst[N]; //存储每个点是否已经在生成树中//如果图不连通,则返回INF(值是0x3f3f3f3f),否则返回最小生成树的树边权重之和intprim(){memset......