1、监控 MySQL

(终端可以安装在任意主机,不一定按在mysql节点上,注:mysql版本需在5.5以上)

  I、首先在mysql中添加监控使用的用户:

  create user 'exp'@'%' identified by 'exp';

  grant process,replication client,select on *.* to 'exp'@'%';

  II、安装监控终端 mysqld_exporter

  cd /data/prometheus/ (此目录为服务器上任意目录,根据个人习惯而定)

  下载地址:https://github.com/prometheus/mysqld_exporter/releases/download/v0.12.1/mysqld_exporter-0.12.1.linux-amd64.tar.gz

  tar -xvf mysqld_exporter-0.12.1.linux-amd64.tar.gz

  mv mysqld_exporter-0.12.1.linux-amd64 mysqld_exporter

  cd mysqld_exporter

  编辑终端使用的配置文件

  vim mysqld_exporter.cnf

  [client]

  host=172.xxx.xxx.xxx
  user=exp
  password=exp

  启动终端程序(次程序为后台启动程序)

  nohup ./mysqld_exporter --config.my-cnf=mysqld_exporter.cnf > mysqld_exporter.log 2>&1 &

  启动后此程序默认端口为9104
  III、添加prometheus监控及倒入grafana模版

  cd /prometheus/prometheus/

  vim prometheus.yml

  - job_name: 'mysql' (监控作业名称)

    static_configs:(静态添加)

    - targets: ['172.26.1.134:9104'](终端地址及端口)

  重新引导prometheus

  curl -X POST http://localhost:9090/-/reload (在prometheus主机上)

  grafana添加模版

  

  导入后效果

  

2、监控 Redis

  I、安装监控终端  

  cd /data/prometheus/ (此目录为服务器上任意目录,根据个人习惯而定)

  下载地址:https://github.com/oliver006/redis_exporter/releases/download/v0.30.0/redis_exporter-v0.30.0.linux-amd64.tar.gz

  tar -xvf redis_exporter-v0.30.0.linux-amd64.tar.gz

  mv redis_exporter-v0.30.0.linux-amd64 redis_exporter

  cd redis_exporter 

  启动终端程序

  ## 无密码 nohup ./redis_exporter -redis.addr 172.26.1.120:6379 &

  ## 有密码 nohup ./redis_exporter -redis.addr 172.26.1.120:6379 -redis.password 123456   
  III、添加prometheus监控及倒入grafana模版

  cd /prometheus/prometheus/

  vim prometheus.yml

  - job_name: 'redis' (监控作业名称)

    static_configs:(静态添加)

    - targets: ['172.26.1.134:9121'](终端地址及端口)

  重新引导prometheus

  curl -X POST http://localhost:9090/-/reload (在prometheus主机上)

  grafana 模版763

  导入后效果

3、监控 Elasticsearch

  I、安装监控终端  

  cd /data/prometheus/ (此目录为服务器上任意目录,根据个人习惯而定)

  下载地址:wget https://github.com/justwatchcom/elasticsearch_exporter/releases/download/v1.1.0/elasticsearch_exporter-1.1.0.linux-amd64.tar.gz

  tar -xvf elasticsearch_exporter-1.1.0.linux-amd64.tar.gz

  mv elasticsearch_exporter-1.1.0.linux-amd64 elasticsearch_exporter

  cd elasticsearch_exporter 

  启动终端程序

  nohup ./elasticsearch_exporter --es.uri http://localhost:9200 & 

  ## 参数说明:
  --es.uri     默认http://localhost:9200,连接到的Elasticsearch节点的地址(主机和端口)。 这可以是本地节点(例如localhost:9200),也可以是远程Elasticsearch服务器的地址
  --es.all 默认flase,如果为true,则查询群集中所有节点的统计信息,而不仅仅是查询我们连接到的节点。
  --es.cluster_settings 默认flase,如果为true,请在统计信息中查询集群设置
  --es.indices 默认flase,如果为true,则查询统计信息以获取集群中的所有索引。
  --es.indices_settings 默认flase,如果为true,则查询集群中所有索引的设置统计信息。
  --es.shards 默认flase,如果为true,则查询集群中所有索引的统计信息,包括分片级统计信息(意味着es.indices = true)。
  --es.snapshots 默认flase,如果为true,则查询集群快照的统计信息。

  III、添加prometheus监控及倒入grafana模版

  cd /prometheus/prometheus/

  vim prometheus.yml

  - job_name: 'es' (监控作业名称)

    static_configs:(静态添加)

    - targets: ['172.26.1.134:9114'](终端地址及端口)

  重新引导prometheus

  curl -X POST http://localhost:9090/-/reload (在prometheus主机上)

  grafana 模版2322

  导入后效果

  

4、监控 RabbitMQ

  

I、安装监控终端  

  cd /data/prometheus/ (此目录为服务器上任意目录,根据个人习惯而定)

  下载地址:wget wget https://github.com/kbudde/rabbitmq_exporter/releases/download/v0.29.0/rabbitmq_exporter-0.29.0.linux-amd64.tar.gz

  tar -xvf rabbitmq_exporter-0.29.0.linux-amd64.tar.gz

  mv rabbitmq_exporter-0.29.0.linux-amd64.tar.gz rabbitmq_exporter

  cd rabbitmq_exporter 

  启动终端程序

  RABBIT_USER=geust RABBIT_PASSWORD=geust OUTPUT_FORMAT=JSON PUBLISH_PORT=9099 RABBIT_URL=http://ip:15672 nohup ./rabbitmq_exporter &

  RABBIT_USER 用户名

  RABBIT_PASSWORD 密码
  PUBLISH_PORT 监控端口
  RABBIT_URL 监控地址
  

  II、添加prometheus监控及倒入grafana模版

  cd /prometheus/prometheus/

  vim prometheus.yml

  - job_name: 'es' (监控作业名称)

     static_configs:(静态添加)

     - targets: ['172.26.1.134:9099'](终端地址及端口)

  重新引导prometheus

  curl -X POST http://localhost:9090/-/reload (在prometheus主机上)

  grafana 模版2121

  导入后效果

  

promethus+grafana监控的更多相关文章

  1. Promethus+Grafana监控解决方案

    [MySQL]企业级监控解决方案Promethus+Grafana Promethus用作监控数据采集与处理,而Grafana只是用作数据展示 一.Promethus简介 Prometheus(普罗米 ...

  2. 使用Promethus+Grafana监控Mongodb

    note:本人周五开始接触promethuse,周一上班就开始搭环境和配置监控,其实本人对这三个东西根本就是略知一二,但是,我预测感觉过程还是简单的,结果... 首先把过程和遇到的问题一一说明. 1. ...

  3. Docker部署Zabbix+Grafana监控

    Docker部署Zabbix+Grafana监控 环境 centos 7 ; Docker 17.12.0-ce ; docker-compose version 1.20.1 2018-4-1 当前 ...

  4. cAdvisor+Prometheus+Grafana监控docker

    cAdvisor+Prometheus+Grafana监控docker 一.cAdvisor(需要监控的主机都要安装) 官方地址:https://github.com/google/cadvisor ...

  5. [转帖]Prometheus+Grafana监控Kubernetes

    原博客的位置: https://blog.csdn.net/shenhonglei1234/article/details/80503353 感谢原作者 这里记录一下自己试验过程中遇到的问题: . 自 ...

  6. 使用Telegraf + Influxdb + Grafana 监控SQLserver服务器的运行状况

    使用Telegraf + Influxdb + Grafana 监控SQLserver服务器的运行状况 前言 本文在Debian9下采用Docker的方式安装Telegraf + Influxdb + ...

  7. 快速接入业务监控体系,grafana监控的艺术

    做一个系统,如果不做监控,是不完善的. 如果为做一个快速系统,花力气去做监控,是不值得的. 因为,我们有必要具备一个能够快速建立监控体系的能力.即使你只是一个普通开发人员! 个人觉得,做监控有三个核心 ...

  8. prometheus+grafana监控redis

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

  9. prometheus+grafana监控mysql

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

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

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

随机推荐

  1. javase_note

    我上班摸鱼重新学习java基础做的笔记,从面向对象开始 面向对象基础 类与对象 人类.鸟类.鱼类...所谓类,就是对一类事物的描述 对象是某一类事物实际存在的每个个体,因此也称为实例 类是抽象概念,对 ...

  2. Newtonsoft.Json高级用法--转载至 焰尾迭 随笔

    本人只做搬运工,以这方便自己学习的态度!以下内容均为拷贝! 如有不适请联系本人! 本文原作者:焰尾迭 本文地址:http://www.cnblogs.com/yanweidie/p/4605212.h ...

  3. HANDLE和HMOUDLE、HWND讲解

    HWND是线程相关的,通常指明窗口句柄,通过句柄找到窗口所属进程和线程 Handle 是代表系统的内核对象,如文件句柄,线程句柄,进程句柄.系统对内核对象以链表的形式进行管理,载入到内存中的每一个内核 ...

  4. git修改历史提交的备注信息

    1 git checkout '版本分支号' && git rebase -i 5bce64d^ (或者 git  rebase -i HEAD ~4)    //5bce64d  是 ...

  5. home条 防止误碰

    某些界面需要隐藏home条,防止误触导致页面返回 - (UIRectEdge)preferredScreenEdgesDeferringSystemGestures { return UIRectEd ...

  6. ORA-01653:unable to extend table xxxxx by 8192 in tablespace xxxxx

    原因:表空间满 解决:扩展表空间 报错截图: 参考摘录:https://blog.csdn.net/qq_35257875/article/details/90295272

  7. notepad++设置

    1.背景颜色 [设置]-[语言格式设置] 选择主题:Solarized-light

  8. 用python将Mybatis日志中的Preparing与Parameters转换为可执行SQL并且美化格式

    一.源代码下载 https://gitee.com/rmtic/SqlLog 说明: 1.可以处理oracle中正则表达中的'?',解决参数'?'冲突问题 2.如果要处理mysql和处理oracle中 ...

  9. RSTP-快速生成树协议

    1 STP的不足之处STP协议虽然能够解决环路问题,但是由于网络拓扑收敛慢,影响了用户通信质量. 2 RSTP概述RSTP在许多方面对STP进行了优化,它的收敛速度更快,而且能够兼容STP. 通过接口 ...

  10. vi 快捷键/ctags

    vi 配置 syntax enableset nu set relativenumberset hlsearch set autoindentset shiftwidth=4set tabstop=4 ...