1、监控MySQL(mysqld-exporter)

https://github.com/prometheus/mysqld_exporter/releases/download/v0.11.0/mysqld_exporter-0.11.0.linux-amd64.tar.gz
(1)被监控mysql机器安装mysqld-exporter
  #tar -C /usr/local/ -xvf mysqld_exporter-0.11.0.linux-amd64.tar.gz

(2)设置配置文件,user为数据库登录用户,password为这个用户的密码

  vi .my.cnf

  [client]
  user=root
  password=123456

(3)启动mysqld-exporter

  /usr/local/mysqld_exporter-0.11.0.linux-amd64/mysqld_exporter --config.my-cnf="/usr/local/mysqld_exporter-0.11.0.linux-amd64/.my.cnf" &

(4)prometheus配置文件中加入mysql监控并重启

  vim /usr/local/Prometheus/prometheus.yml

  默认mysqld-exporter端口为9104

  - job_name: 'MySQL'

  static_configs:
  - targets: ['192.168.0.103:9104']

(5)设置数据源
  grafana界面添加mysql数据源

(6)导入已经画好的dashboard,数据源选择刚刚创建好的mysql数据源即可

  • 链接:https://pan.baidu.com/s/1GBzogDLsYS3IvwH4WbdPLw 提取码:ef6e

    2、监控Redis(redis_exporter)

    链接:https://pan.baidu.com/s/12y7HxtQlBjFwr_i8ClM8Kw 提取码:13v2
    (1)安装redis_exporter

      tar -C /usr/local/ -xvf redis_exporter-v0.15.0.linux-amd64.tar.gz
    (2)启动redis_exporter

      默认redis_exporter端口为9121

    ./redis_exporter redis//192.168.0.103:6379 & -web.listenaddress 192.168.0.103:9121
    (3)prometheus配置文件中加入redis监控并重启

    vim /usr/local/Prometheus/prometheus.yml
    默认redis-exporter端口为9121

    - job_name: 'Redis'
    static_configs:
    - targets: ['192.168.0.103:9121']
    (4)grafana导入画好的dashboard

    链接:https://pan.baidu.com/s/1LIkVC0o3lyTT59JbX0mSpg 提取码:gf1d

Prometheus + Grafana 监控(mysql 和redis)的更多相关文章

  1. Prometheus+Grafana监控MySQL、Redis数据库

    俗话说,没有监控的系统就是在裸奔,好的监控就是运维人员的第三只手,第三只眼.本文将使用prometheus及Grafana搭建一套监控系统来监控主机及数据库(MySQL.Redis). 1.  安装G ...

  2. [转帖]安装prometheus+grafana监控mysql redis kubernetes等

    安装prometheus+grafana监控mysql redis kubernetes等 https://www.cnblogs.com/sfnz/p/6566951.html plug 的模式进行 ...

  3. prometheus+grafana监控mysql

    prometheus+grafana监控mysql 1.安装配置MySQL官方的 Yum Repository(有mysql只需设置监控账号即可) [root@localhost ~]# wget - ...

  4. 使用Prometheus+Grafana监控MySQL实践

    一.介绍Prometheus Prometheus(普罗米修斯)是一套开源的监控&报警&时间序列数据库的组合,起始是由SoundCloud公司开发的.随着发展,越来越多公司和组织接受采 ...

  5. prometheus+grafana监控mysql最佳实践

    导航 前言 环境准备 安装Docker 安装prometheus 安装mysqld_exporter prometheus采集数据 安装grafana grafana配置数据源 感谢您的阅读,预计阅读 ...

  6. 技术分享 | Prometheus+Grafana监控MySQL浅析

    GreatSQL社区原创内容未经授权不得随意使用,转载请联系小编并注明来源. 简介 Prometheus 一套开源的监控&报警&时间序列数据库的组合,通常 Kubernetes 中都会 ...

  7. 安装prometheus+grafana监控mysql redis kubernetes等

    1.prometheus安装 wget https://github.com/prometheus/prometheus/releases/download/v1.5.2/prometheus-1.5 ...

  8. prometheus+grafana监控redis

    prometheus+grafana监控redis redis安装配置 https://www.cnblogs.com/autohome7390/p/6433956.html redis_export ...

  9. Prometheus + Grafana 监控系统搭

    本文主要介绍基于Prometheus + Grafana 监控Linux服务器. 一.Prometheus 概述(略) 与其他监控系统对比 1 Prometheus vs. Zabbix Zabbix ...

随机推荐

  1. 用Springboot干掉IBM的WAS-为公司省点钱

    1 那一夜,你伤害了我 今夜的雨下得凉快,小南睡得正香,突然收到远洋运维小周的电话:Hello, Are you OK? WAS有issue,快起来help me! 只见小南登陆WAS机,查看了机器日 ...

  2. postman查看打印

    原文:https://www.jianshu.com/p/f165a99245e3 1.再postman中每个请求的 Pre-request Script和Tests中都可以写代码2.也可将值打印到C ...

  3. 如何开发一个自己的npm包

    目录 一.初始化npm包 二.新建自己的工具类 三.新建入口文件index.js 四.编写单元测试 五.登录仓库 六.发布包 七.安装使用 八.删除包 一.初始化npm包 npm init 运行输入包 ...

  4. 【JMeter_07】JMeter逻辑控制器__循环控制器<Loop Controller>

    循环控制器<Loop Controller> 业务逻辑: 根据所填写的循环次数,对当前节点下的取样器进行响应次数的循环请求,这里可以填写变量.整数.小数.字母.负数.各种符号等: 当填写整 ...

  5. ubuntu启动打开终端快捷键

    ubuntu启动打开终端快捷键 CTRL+ALT+T

  6. break,continue,break的用法与区别

    1.return 语句的作用 (1) return 从当前的方法中退出,返回到该调用的方法的语句处,继续执行.       (2) return 返回一个值给调用该方法的语句,返回值的数据类型必须与方 ...

  7. VScode Doxygen与Todo Tree插件的使用与安装

    VScode Doxygen与Todo Tree插件的使用与安装 引言 程序中代码注释的规范和统一性是作为工程人员必不可少的技能,本文在Visual Studio Code的环境下简单介绍Doxyge ...

  8. django xadmin 配置过程

    1.拷贝xadmin的一个下的一个xadmin文件夹放到项目里

  9. linux 在指定文件夹下查找指定字符

    grep -r '119090610015743205' /data/html/www/gap_bz_middleware/storage/apiLogs/

  10. layer.open弹框中的表单数据无法获取

    layer.open弹框中的表单数据无法获取 表单数据模板 layer.open() 页面效果: 当点击确定后,radio和textarea获取的值总是为空,解决办法: var setPriCustB ...