1.prometheus安装

软件下载:

wget https://dl.grafana.com/oss/release/grafana-6.4.2-1.x86_64.rpm

https://github.com/prometheus/prometheus/releases/download/v2.13.0/prometheus-2.13.0.linux-amd64.tar.gz

wget https://golang.org/doc/install?download=go1.13.1.linux-amd64.tar.gz

说明:虚拟机Centos7 环境下进行安装.

1.1环境装备
配置golang的环境
wget https://golang.org/doc/install?download=go1.13.1.linux-amd64.tar.gz
tar -C /usr/local/ -xvf go1.13.1.linux-amd64.tar.gz
添加到环境变量中
vim /etc/profile
export PATH=$PATH:/usr/local/go/bin
重载环境变量
source /etc/profile
查看版本
go version
1.2安装Prometheus
tar -C /usr/local/ -xvf   prometheus-2.13.0.linux-amd64.tar.gz
ln -sv /usr/local/prometheus-2.13.0.linux-amd64/ /usr/local/prometheus
启动:
/usr/local/prometheus/prometheus --storage.tsdb.path=/data/ --config.file=/usr/local/prometheus/prometheus.yml
暂时关闭防火墙
systemctl stop firewalld.service
登录:http://192.168.31.91:9090
1.3安装Grafana
rpm -ivh --nodeps grafana-6.4.2-1.x86_64.rpm
启动:
systemctl daemon-reload
systemctl enable grafana-server.service
systemctl start grafana-server.service
登录:http://192.168.31.91:3000/login 初始密码:admin admin
安装饼图插件:
grafana-cli plugins install grafana-piechart-panel

注意Grafana 密码重置

yum的安装方式,源码安装方式找到grafana.db文件

sqlite3 /var/lib/grafana/grafana.db

update user set password = '59acf18b94d7eb0694c61e60ce44c110c7a683ac6a8f09580d626f90f4a242000746579358d77dd9e570e83fa24faa88a8a6', salt = 'F3FAxVm33R' where login = 'admin';

1.4.配置Grafana

添加prometheus数据源

点击主界面的“Add data source”

Dashboards页面选择“Prometheus 2.0 Stats”

Settings页面填写普罗米修斯地址并保存

如果需要告警的配置需要下载alertmanager

Prometheus的告警机制是server推送告警到alertmanger,配置告警规则和告警方式

插件下载地址https://github.com/prometheus/alertmanager/releases/download/v0.19.0/alertmanager-0.19.0.linux-amd64.tar.gz

具体架构图如下:

如果在prometheus的http://localhost:9090/管理界面没有数据同时又No datapoints found报错显示

解决方案:一定要修改服务器的时间


prometheus部署的更多相关文章

  1. k8s全方位监控-prometheus部署

    1.k8s 监控资源对象 2. prometheus简单介绍. https://github.com/prometheus •多维数据模型:由度量名称和键值对标识的时间序列数据•PromSQL:一种灵 ...

  2. Prometheus部署各服务的Node监控

    1.部署监控主机 部署主机监控,需要安装node_exporter 1.1 下载node exporter wget https://github.com/prometheus/node_export ...

  3. prometheus部署安装

    1. 下载&部署 # 下载 [root@prometheus src]# cd /usr/local/src/ [root@prometheus src]# wget https://gith ...

  4. Kubernetes实战总结 - Prometheus部署

    什么是普罗米修斯? Prometheus是最初在SoundCloud上构建的开源系统监视和警报工具包 . 自2012年成立以来,许多公司和组织都采用了Prometheus,该项目拥有非常活跃的开发人员 ...

  5. Prometheus部署监控容器

    Prometheus架构描述 Prometheus 是一个非常优秀的监控工具.准确的说,应该是监控方案.Prometheus 提供了监控数据搜集.存储.处理.可视化和告警一套完整的解决方案 Prome ...

  6. Prometheus学习笔记(2)Prometheus部署

    目录 Prometheus的安装配置启动 Prometheus的安装配置启动 1.Prometheus二进制安装 Prometheus下载链接:https://prometheus.io/downlo ...

  7. Prometheus 和 Grafana 安装部署

    Prometheus 是一套开源的系统监控报警框架.Prometheus 作为生态圈 Cloud Native Computing Foundation(简称:CNCF)中的重要一员,其活跃度仅次于 ...

  8. prometheus + grafana安装部署(centos6.8)

    官方网址:https://prometheus.io/ GitHub网址:https://github.com/prometheus/prometheus 软件下载地址:https://prometh ...

  9. Prometheus+Grafana监控部署实践

    参考文档: Prometheus github:https://github.com/prometheus grafana github:https://github.com/grafana/graf ...

随机推荐

  1. vue中 :style 与 :class 三元运算符使用

    参考链接:https://www.jianshu.com/p/31664974303d

  2. POJ 1161 Walls【floyd 以面为点建图】

    题目链接:http://poj.org/problem?id=1161 题目大意: 1.给出m个区域,n个俱乐部点.接下来是n个俱乐部点以及各个区域由什么点围成.求一个区域到各个俱乐部点的距离之和最小 ...

  3. Java总复习内容

    StringBuffer定义时需要用正确的方式 例如: StringBuffer xxx = new StringBuffer("雯雯是猪"); 使用StringBuffer的连接 ...

  4. 【Funny Things】002——鞋的颜色

    网上的那张鞋子的图片到底是什么颜色的?灰绿色还是粉色? 1. 先截取图片中鞋的那块的图片,获取大小 2. 带入大小分别计算R,G,B平均值 3. 通过计算所得的数据画图可得结果 from PIL im ...

  5. Netty源码剖析-构建链接

    参考文献:极客时间傅健老师的<Netty源码剖析与实战>Talk is cheap.show me the code! ----主线: 和启动一样也是有两个线程完成的,boss threa ...

  6. 【剑指OFFER】链表中倒数第k个结点

    [问题描述] 输入一个链表,输出该链表中倒数第k个结点. 时间限制:1秒 空间限制:32768K [AC代码] p先走k步,q再走,这样p和q的距离就是k了,等p走到尽头,那么q自然就到了倒数第k个位 ...

  7. Win10默认输入法怎么打顿号

    这个问题发现于一个月之前,解决于今天,方式百度. 一.主要是想纪念一下我这一个月的蠢操作(贴图证蠢): 这一个月我的顿号都是这样打出来的,(′д` )…彡…彡 二.闲话少叙,说一下解决方式: 之前用的 ...

  8. docker服务端与客户端通信方式

    docker的服务端与客户端间可以通过unix.tcp方式进行通信.但默认情况下,服务端只监听本地unix接口/var/run/docker.sock,所以客户端只能在服务端所在的机器上使用该unix ...

  9. VS2017生成一个简单的DLL文件 和 LIB文件——C语言

    下面我们将用两种不同的姿势来用VS2017生成dll文件(动态库文件)和lib文件(静态库文件),这里以C语言为例,用最简单的例子,来让读者了解如何生成dll文件(动态库文件) 生成动态库文件 姿势一 ...

  10. Fiddler 抓包工具详解

    Fiddler是一个蛮好用的抓包工具,可以将网络传输发送与接受的数据包进行截获.重发.编辑.转存等操作.也可以用来检测网络安全.反正好处多多,举之不尽呀!当年学习的时候也蛮费劲,一些蛮实用隐藏的小功能 ...