GPE监控预警系统(Grafana+Prometheus+Exporter)

GPE监控预警系统结构图

一: Grafana的安装

1:简介

大规模指标数据的可视化展现,是网络架构和应用分析中最流行的时序数据展示工具、目前已经支持绝大部分常用的时序数据库。
Grafana支持许多不同的数据源。每个数据源都有一个特定的查询编辑器,该编辑器定制的特性和功能是公开的特定数据来源。 官方支持以下数据源:Graphite,Elasticsearch,InfluxDB,Prometheus,Cloudwatch,MySQL和OpenTSDB等

2:安装

linux下安装

Step1:下载
wget https://dl.grafana.com/oss/release/grafana-6.5.1-1.x86_64.rpm
sudo yum localinstall grafana-6.5.1-1.x86_64.rpm
Step2:启动
sudo service grafana-server start
Step3:访问
  • 安装成功后浏览器输入 localhost:3000 可以访问grafana主页,grafana默认端口3000、默认用户名和密码为admin/admin


windows下安装

参考网址 https://www.jianshu.com/p/7e7e0d06709b

Step1:下载
  • 下载地址:https://grafana.com/grafana/download?platform=windows
Step2:下载后点击安装即可

Step3:访问
  • 安装成功后浏览器输入 localhost:3000 可以访问grafana主页,grafana默认端口3000、默认用户名和密码为admin/admin

二: Prometheus

1:简介

Prometheus是一个开源的服务监控系统,它通过HTTP协议从远程的机器收集数据并存储在本地的时序数据库上

2:安装

下载promethues 下载地址:https://prometheus.io/download/

Linux下安装

Step1:下载

Step2:解压重命名

tar -zxvf prometheus-2.14.0.linux-amd64.tar.gz
mv prometheus-2.14.0.linux-amd64 promethues

Step3:启动

./prometheus

Step4:访问

  • 输入ip+端口号进行访问

windowns下安装

Step1:下载

Step2:解压

Step3:启动

双击解压目录下的promethues.exe文件

Step4:访问

  • 查看配置文件中相应的端口号
  • 地址栏输入地址进行访问、显示如下界面则表示安装成功

二: Exporter

1:简介

定义

  • 向Prometheus提供监控样本数据的程序、Exporter的一个实例称为target,Prometheus通过轮询的方式定期从这些target中获取样本数据

来源

  • 社区提供的

Prometheus社区提供了丰富的Exporter实现,涵盖了从基础设施,中间件以及网络等各个方面的监控功能。这些Exporter可以实现大部分通用的监控需求。下表列举一些社区中常用的Exporter:

范围 常用Exporter
数据库 MySQL Exporter, Redis Exporter, MongoDB Exporter, MSSQL Exporter等
硬件 Apcupsd Exporter,IoT Edison Exporter, IPMI Exporter, Node Exporter等
消息队列 Beanstalkd Exporter, Kafka Exporter, NSQ Exporter, RabbitMQ Exporter等
存储 Ceph Exporter, Gluster Exporter, HDFS Exporter, ScaleIO Exporter等
HTTP服务 Apache Exporter, HAProxy Exporter, Nginx Exporter等
API服务 AWS ECS Exporter, Docker Cloud Exporter, Docker Hub Exporter, GitHub Exporter等
日志 Fluentd Exporter, Grok Exporter等
监控系统 Collectd Exporter, Graphite Exporter, InfluxDB Exporter, Nagios Exporter, SNMP Exporter等
其它 Blockbox Exporter, JIRA Exporter, Jenkins Exporter, Confluence Exporter等
  • 用户自定义的

除了直接使用社区提供的Exporter程序以外,用户还可以基于Prometheus提供的Client Library创建自己的Exporter程序,目前Promthues社区官方提供了对以下编程语言的支持:Go、Java/Scala、Python、Ruby。同时还有第三方实现的如:Bash、C++、Common Lisp、Erlang,、Haskeel、Lua、Node.js、PHP、Rust等。

2:安装

以mysqld exporter 为例–此处只演示windows下的安装,linux下类同。

  • Step1:下载
    地址:https://prometheus.io/download/

  • Step2:解压+新建配置文件
    解压后在当前目录新建==.my.conf==的文件,进行如下配置:

     [client]host=127.0.0.1user=test //此为mysql_exporter连接mysql需要用到的用户,自己设置password=test
    

  • Step3:mysql数据库用户名配置
    在mysql数据库种新增刚设置的用户名和密码并赋予相应的权限

       create user 'exporter'@'localhost' identified by '123456';GRANT REPLICATION CLIENT, PROCESS ON *.* TO 'exporter'@'localhost';GRANT SELECT ON performance_schema.* TO 'exporter'@'localhost';ALTER USER exporter@localhost IDENTIFIED WITH mysql_native_password BY '123456';flush privileges;
    
  • Step4:命令行启动
    进入mysqld_exporter解压目录,命令行键入如下语句即可启动成功

      mysqld_exporter --config.my-cnf=.my.cnf
    

  • Step5:访问地址
    地址栏输入地址http://127.0.0.1:9104/metrics显示如下图则说明安装成功

GPE监控预警系统搭建--Grafana+Prometheus+Exporter相关推荐

  1. GPE监控多台MySQL_GPE监控预警系统(Grafana+Prometheus+Exporter)搭建

    GPE监控预警系统结构图 一: Grafana 1:简介 大规模指标数据的可视化展现,是网络架构和应用分析中最流行的时序数据展示工具.目前已经支持绝大部分常用的时序数据库. Grafana支持许多不同 ...

  2. GPE(Grafana+Prometheus+Exporter)项目实战之Golang篇(上)

    项目目标-为什么要搭建GPE(Grafana+Prometheus+Exporter) 关注我的朋友知道,前几天开源了boot4go-gateway的项目,boot4go-gateway的http服务 ...

  3. GPE监控预警系统使用【 mysql数据库监控】

    一:搭建GPE监控预警系统 参考文章:https://blog.csdn.net/weixin_30641567/article/details/103426376 二:监控mysql数据库 Step ...

  4. Grafana + Prometheus + Exporter (一)

    Grafana + Prometheus + Exporter (一) 原文地址:https://www.lucien.ink/archives/449/ 1. 摘要 本文主要介绍如何使用 node_ ...

  5. Grafana+Prometheus+Exporter(简称GPE监控预警系统)试用

    1.Grafana安装(linux) 下载:https://grafana.com/grafana/download 下载 wget https://dl.grafana.com/oss/releas ...

  6. GPE监控预警系统-Prometheus 概述.md

    Prometheus 是什么? Prometheus是一套开源的监控&报警&时间序列数据库的组合,起始是由SoundCloud公司开发的.随着发展,越来越多公司和组织接受采用Prome ...

  7. 使用 docker 搭建 grafana+prometheus 监控服务器资源(壹)

    docker+granfana+prometheus 容器的基本操作方法 一.Docker下安装Prometheus 1.1 docker下查看prometheus 1.2 docker下拉取prom ...

  8. GPE监控预警系统-node_exporter.md

    node_exporter 该exporter提供服务器状态相关的metric,为最基础的exporter 安装 cd /op/monitor https://github.com/prometheu ...

  9. GPE监控预警系统-nginx_exporter.md

    Monitor nginx for Prometheus nginx vts and lua 的安装 前置条件 源码安装 nginx 安装 ###下载 wget https://github.com/ ...

最新文章

  1. cisco路由器与QOS技术
  2. PingCode Wiki 多人实时协同编辑功能发布
  3. 卓晴老师“标杆课教师“采访提纲
  4. 脑电分析系列[MNE-Python-16]| 脑电数据的Epoching处理
  5. python3最新稳定版本-python稳定版本
  6. php 引入echarts路径,angular4中引入echarts的方法(代码示例)
  7. 《架构漫谈》阅读感想
  8. python 中统计超大文件行数
  9. java位宽_java数据类型
  10. 颜色空间YUV、RGB理解(二)
  11. 机械工业设计中常见三维软件大盘点
  12. android framework手机系统改机相关知识简单方案
  13. JS实现拼音搜索汉字(支持首字母匹配)
  14. Linux网络编程(Socket)(一)
  15. 三颗种子开发系统源码
  16. java runtime是什么软件_Java SE Runtime Environment (JRE) 运行Java程序的必备软件
  17. 利用多种语言打印出:第一行一个*,第二行两个*,依次类推
  18. windows script host是什么意思,windows based script host
  19. BZOJ4833 [Lydsy1704月赛]最小公倍佩尔数
  20. 微软 2018 开源大事记

热门文章

  1. [dfs][思维]Infected Tree CF1689C
  2. 用计算机图形学如何输出字符,计算机图形学复习题1
  3. Python之爬取百度地图兴趣点(POI)数据
  4. Android-MVVM开发模式应用
  5. Cohort Analysis:留存分析Excel版
  6. Navigation导航寻路RecastDemo讲解
  7. windows开机运行python脚本_python打包exe开机自动启动的实例(windows)
  8. 第二次作业——评分!
  9. 手机c语言编译器ide文件位置,C语言编译器IDE手机版下载
  10. 上海亚商投顾:沪指创年内新高 大金融、中字头集体走强