zoukankan      html  css  js  c++  java
  • grafana集成prometheus

    1. 下载prometheus

    https://prometheus.io/download/
    

    window环境下点击指定版本下载

    并解压

    2. 启动prometheus

    # 启动prometheus并允许动态更新配置
    prometheus --config.file=prometheus.yml --web.enable-lifecycle
    # 动态更新prometheus配置
    curl -X POST http://localhost:9090/-/reload
    


    3. 安装grafana

    # 官方文档地址
    https://grafana.com/docs/grafana/latest/installation/windows/
    

    下载,点击下一步,安装

    通过执行bin目录grafana-server.exe中的启动Grafana ,最好从命令行启动。如果要将Grafana作为Windows服务运行,请下载 NSSM。使用该工具将Grafana添加为Windows服务非常容易。

    默认用户名和密码都是是admin

    4. grafana集成prometheus

    • 创建数据源
      1. 数据源使用
      http://localhost:9090/metrics
      


    • 创建dashboard

      保存(ctrl+s)

      指定数据源

      点击保存(ctrl+s)

    回到首页就可以看到

    • 创建panel

      继续编辑

      保存配置,显示效果如下

    再添加一个实时图

    先添加数据源

    保存

    prometheus提供数据源,grafana通过可视化配置作出很好看的图表

  • 相关阅读:
    差分约束系统
    LCA
    CRB and Candies LCM 性质
    【强连通分量】 Kosaraju和Tarjan算法 (标准模板+详细注释)
    最小生成树
    堆优化的迪杰斯特拉算法
    SPFA算法
    Floyd算法
    Dijkstra算法
    图论中环的判断
  • 原文地址:https://www.cnblogs.com/ifme/p/12692969.html
Copyright © 2011-2022 走看看