prometheus部署
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部署的更多相关文章
- k8s全方位监控-prometheus部署
1.k8s 监控资源对象 2. prometheus简单介绍. https://github.com/prometheus •多维数据模型:由度量名称和键值对标识的时间序列数据•PromSQL:一种灵 ...
- Prometheus部署各服务的Node监控
1.部署监控主机 部署主机监控,需要安装node_exporter 1.1 下载node exporter wget https://github.com/prometheus/node_export ...
- prometheus部署安装
1. 下载&部署 # 下载 [root@prometheus src]# cd /usr/local/src/ [root@prometheus src]# wget https://gith ...
- Kubernetes实战总结 - Prometheus部署
什么是普罗米修斯? Prometheus是最初在SoundCloud上构建的开源系统监视和警报工具包 . 自2012年成立以来,许多公司和组织都采用了Prometheus,该项目拥有非常活跃的开发人员 ...
- Prometheus部署监控容器
Prometheus架构描述 Prometheus 是一个非常优秀的监控工具.准确的说,应该是监控方案.Prometheus 提供了监控数据搜集.存储.处理.可视化和告警一套完整的解决方案 Prome ...
- Prometheus学习笔记(2)Prometheus部署
目录 Prometheus的安装配置启动 Prometheus的安装配置启动 1.Prometheus二进制安装 Prometheus下载链接:https://prometheus.io/downlo ...
- Prometheus 和 Grafana 安装部署
Prometheus 是一套开源的系统监控报警框架.Prometheus 作为生态圈 Cloud Native Computing Foundation(简称:CNCF)中的重要一员,其活跃度仅次于 ...
- prometheus + grafana安装部署(centos6.8)
官方网址:https://prometheus.io/ GitHub网址:https://github.com/prometheus/prometheus 软件下载地址:https://prometh ...
- Prometheus+Grafana监控部署实践
参考文档: Prometheus github:https://github.com/prometheus grafana github:https://github.com/grafana/graf ...
随机推荐
- [LuoguP2163][SHOI2007]园丁的烦恼_CDQ分治
园丁的烦恼 题目链接:https://www.luogu.org/problem/P2163 数据范围:略. 题解: 树套树过不去,那就$CDQ$分治好了. 有点小细节,但都是$CDQ$分治必要的. ...
- Redis 学习笔记(篇五):对象(RedisObject)
Redis-对象 在以前的文章中,我们介绍了 Redis 用到的主要数据结构,比如简单动态字符串.双端链表.字典.压缩列表.整数集合. 然而 Redis 并没有直接使用这些数据结构来实现键值对的数据库 ...
- Mac命令行启动关闭Tomcat
在Tomcat目录的bin目录下执行sh startup.sh或./startup.sh命名启动Tomcat,执行sh shutdown.sh或./shutdown.sh命令关闭Tomcat 浏览器输 ...
- if (strAreaCode.Find("体检")>=0)
string类提供了6种查找函数,每种函数以不同形式的find命名. 这些操作全部返回string::size_type类型的值,以下形式标记查找匹配所发生的位置: 或者返回一个名为string::n ...
- 第7章:LeetCode--算法:递归问题
70. Climbing Stairs This problem is a Fibonacci problem.F(n)=F(n-1)+F(n-2);Solving this problem by r ...
- 剑指offer18:操作给定的二叉树,将其变换为源二叉树的镜像。
1 题目描述 操作给定的二叉树,将其变换为源二叉树的镜像. 2 输入描述: 二叉树的镜像定义:源二叉树 8 / \ 6 10 / \ / \ 5 7 9 11 镜像二叉树 8 / \ 10 6 / \ ...
- Spring实战(二)Spring容器和bean的生命周期
引入问题: 在XML配置文件中配置bean后,这些文件又是如何被加载的?它们被加载到哪里去了? Spring容器——框架核心 1.什么是Spring容器?它的功能是什么? 在基于Spring的应用中, ...
- UVA Tress in a Wood
https://vjudge.net/problem/UVA-10214 题意:给定一个坐标系.|x|<=a, |y|<=b 求坐标系中有多少点是可以从原点直接看到(即从原点和一个点连线, ...
- 3-MySQL DBA笔记-开发基础
第二部分 开发篇 本篇首先讲述数据库开发的一些基础知识,如关系数据模型.常用的SQL语法.范式.索引.事务等,然后介绍编程开发将会涉及的数据库的一些技巧,最后结合生产实际,提供一份开发规范供大家参考. ...
- ASP.NET 中的 Session 怎么正确使用
Session对象用于存储从一个用户开始访问某个特定的aspx的页面起,到用户离开为止,特定的用户会话所需要的信息.用户在应用程序的页面切换时,Session对象的变量不会被清除. 对于一个Web应用 ...