Skip to content
石头软件测试技术分享石头软件测试技术分享
主页
github icon
  • 辅助技能

    • 编程语言
      • 环境部署

        • linux常用命令
          • shell
            • docker
              • nginx
                • redis
                  • mysql
                    • allure
                      • sonarqube部署
                      • 工具

                        • adb
                          • git的使用
                            • 抓包工具
                              • 资源监控
                                • prometheus安装
                                  • prometheus介绍
                                    • 安装go
                                      • 解压
                                        • 配置go环境变量
                                          • prometheus下载
                                            • 解压
                                              • 创建软连接
                                                • 选择配置文件启动
                                                • 可视化工具grafana安装
                                                  • grafana介绍
                                                    • 安装命令
                                                      • 修改端口
                                                        • 启动
                                                          • 停止
                                                            • 重启

                                                      资源监控

                                                      author icon石头calendar icon2022年1月17日category icon
                                                      • 测试辅助技能
                                                      tag icon
                                                      • 监控
                                                      timer icon大约 1 分钟

                                                      此页内容
                                                      • prometheus安装
                                                        • prometheus介绍
                                                        • 安装go
                                                        • 解压
                                                        • 配置go环境变量
                                                        • prometheus下载
                                                        • 解压
                                                        • 创建软连接
                                                        • 选择配置文件启动
                                                      • 可视化工具grafana安装
                                                        • grafana介绍
                                                        • 安装命令
                                                        • 修改端口
                                                        • 启动
                                                        • 停止
                                                        • 重启

                                                      # 资源监控

                                                      # prometheus安装

                                                      # prometheus介绍

                                                      Prometheus是一个开源系统监控和警报工具包,最初是在SoundCloud 上构建的 。自 2012 年成立以来,许多公司和组织都采用了 Prometheus,该项目拥有非常活跃的开发者和用户社区。它现在是一个独立的开源项目,独立于任何公司进行维护。
                                                      Prometheus 将其指标收集并存储为时间序列数据,即指标信息与记录的时间戳一起存储,以及称为标签的可选键值对。

                                                      # 安装go

                                                      下载地址

                                                      https://golang.org/dl/
                                                      
                                                      1

                                                      # 解压

                                                      tar -C /usr/local/ -xvf go1.11.4.linux-amd64.tar.gz
                                                      
                                                      1

                                                      # 配置go环境变量

                                                      vim /etc/profile
                                                      
                                                      1
                                                      export PATH=$PATH:/usr/local/go/bin
                                                      
                                                      1
                                                      source /etc/profile
                                                      
                                                      1

                                                      # prometheus下载

                                                      https://prometheus.io/download/ 
                                                      
                                                      1

                                                      # 解压

                                                      tar -C /usr/local/ -xvf prometheus-2.26.0.linux-amd64.tar.gz
                                                      
                                                      1

                                                      # 创建软连接

                                                      ln -sv /usr/localprometheus-2.26.0.linux-amd64/ /usr/local/Prometheus
                                                      
                                                      1

                                                      # 选择配置文件启动

                                                      /usr/local/Prometheus/prometheus --config.file=/usr/local/Prometheus/prometheus.yml &
                                                      
                                                      1

                                                      # 可视化工具grafana安装

                                                      # grafana介绍

                                                      可视化面板,功能齐全的度量仪表盘和图形编辑器,支持 Graphite、zabbix、InfluxDB、Prometheus、OpenTSDB、Elasticsearch 等作为数据源,比 Prometheus 自带的图表展示功能强大太多,更加灵活,有丰富的插件,功能更加强大。

                                                      # 安装命令

                                                      wget https://dl.grafana.com/oss/release/grafana-7.5.3-1.x86_64.rpm
                                                      sudo yum install grafana-7.5.3-1.x86_64.rpm
                                                      
                                                      1
                                                      2

                                                      # 修改端口

                                                      找到端口修改之后去除前面的; 然后再重启服务

                                                      vi /etc/grafana/grafana.ini
                                                      
                                                      1

                                                      # 启动

                                                      service grafana-server start
                                                      
                                                      1

                                                      # 停止

                                                      service grafana-server stop
                                                      
                                                      1

                                                      # 重启

                                                      service grafana-server restart
                                                      
                                                      1

                                                      提示

                                                      内容正在完善中,请耐心等待...

                                                      上一页
                                                      抓包工具
                                                      Copyright © 2021-present Evan You 石头 | 备案号 : 蜀ICP备2021021200号-2 | 友情链接 : APP开发者工具