前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >DBA必须知道的监控工具

DBA必须知道的监控工具

作者头像
DBA札记
发布2023-10-02 14:16:44
2150
发布2023-10-02 14:16:44
举报
文章被收录于专栏:MySQL参数系列MySQL参数系列

今天给大家介绍一款非常好用的监控工具,percona出品的pmm2。该工具主要是封装了VictoriaMetrics(Promethuse的替代品,和Promethuse API兼容)、Grafana、ClickHouse等优秀产品,可以实现MySQL、MongoDB、PostgreSQL数据库的监控(其他库也可以自定义实现),有丰富的默认监控指标与看板。除此之外,集成的慢查询分析功能也非常香。开箱即用!

架构图

安装步骤

第一步 安装 docker

代码语言:javascript
复制
#centos8
#1. 下载docker-ce的repo
curl https://download.docker.com/linux/centos/docker-ce.repo -o /etc/yum.repos.d/docker-ce.repo
#2. 安装依赖(这是相比centos7的关键步骤)
yum install https://download.docker.com/linux/fedora/30/x86_64/stable/Packages/containerd.io-1.2.6-3.3.fc30.x86_64.rpm
#3. 安装docker-ce
yum install docker-ce -y
#4. 启动docker
systemctl start docker

第二步 安装pmm-server

代码语言:javascript
复制
#拉取镜像
docker pull percona/pmm-server:2
#创建数据卷
docker volume create pmm-data
#启动容器
docker run --detach --restart always --publish 443:443 -v pmm-data:/srv --name pmm-server percona/pmm-server:2
#修改admin密码
docker exec -t pmm-server change-admin-password passwordxxx
#查看日志
docker logs  pmm-server
#查看网页 (非本地环境localhost换成机器ip 注意防火墙要开通)
#账户:admin 密码:passwordxxx (参考修改admin密码步骤的密码)
https://localhost:443 

第三步 被监控节点安装 pmm-client

代码语言:javascript
复制
#1 配置yum源
yum install -y https://repo.percona.com/yum/percona-release-latest.noarch.rpm
#2 安装pmm2-client
yum install -y pmm2-client
#3  查看版本
pmm-admin --version
#4 注册节点 注意admin账户密码和ip不要填错
pmm-admin config --server-insecure-tls --server-url=https://admin:passwordxxx@X.X.X.X:443

# 说明:
# X.X.X.X is the address of your PMM Server.
# 443 is the default port number.
# admin/admin is the default PMM username and password. This is the same account you use to log into the PMM user interface, which you had the option to change when first logging in.

安装完登录界面长这样,更多内容大家自行探索。

参考文档

代码语言:javascript
复制
https://docs.percona.com/percona-monitoring-and-management/index.html

今天就介绍到这里了。非常好的项目,值得让更多人知道。

本文参与 腾讯云自媒体分享计划,分享自微信公众号。
原始发表:2023-09-30 22:50,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 DBA札记 微信公众号,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 架构图
  • 安装步骤
    • 第一步 安装 docker
      • 第二步 安装pmm-server
        • 第三步 被监控节点安装 pmm-client
        • 参考文档
        相关产品与服务
        容器镜像服务
        容器镜像服务(Tencent Container Registry,TCR)为您提供安全独享、高性能的容器镜像托管分发服务。您可同时在全球多个地域创建独享实例,以实现容器镜像的就近拉取,降低拉取时间,节约带宽成本。TCR 提供细颗粒度的权限管理及访问控制,保障您的数据安全。
        领券
        问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档