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通过可视化配置作出很好看的图表

  • 相关阅读:
    数据存储 twisted
    数据存储 mongodb
    数据存储 redis
    数据存储 txt
    同时使用有线内网与无线外网
    使用xshell从服务器下载文件
    everything使用技巧
    【吴恩达机器学习】第8章 正则化
    python文件重命名
    【统计学习】 第5章 决策树
  • 原文地址:https://www.cnblogs.com/ifme/p/12692969.html
Copyright © 2011-2022 走看看