页面“云计算SPI三大模式”与“Monitoring with prometheus”之间的差异

来自linux中国网wiki
(页面间的差异)
跳到导航 跳到搜索
(导入1个版本)
 
 
第1行: 第1行:
 +
==
 +
 +
 +
=book=
 +
 +
[https://www.bookstack.cn/read/prometheus-book/README.md  Prometheus操作指南]
 +
=进阶=
 +
以后全改成自己 docker-compose build
 +
 +
[https://blog.51cto.com/wzlinux/2487300 prometheus 监控概述(一)有常用监控警告]
 +
 +
[https://blog.51cto.com/wzlinux/2490670 PromQL 内置函数(三)]
 +
 +
 +
 +
[https://www.jb51.net/article/189679.htm  prometheus python 库编写自定义指标的方法(完整代码)]
 +
 +
=ins on docker-composer=
 +
https://gitee.com/atompi/PrometheusStackDockerCompose
 +
 +
=安全=
 
<pre>
 
<pre>
云计算SPI三大模式
+
node exporter 添加防火墙
 +
 
 +
curl -Lo /etc/yum.repos.d/_copr_ibotty-prometheus-exporters.repo https://copr.fedorainfracloud.org/coprs/ibotty/prometheus-exporters/repo/epel-7/ibotty-prometheus-exporters-epel-7.repo
 +
# yum install node_exporter
 +
</pre>
 +
 
 +
=prometheus=
 +
[[Nginx用户密码认证配置 Basic HTTP authentication]]
 +
 
 +
不错的书
 +
https://yunlzheng.gitbook.io/prometheus-book/
 +
 
 +
 
 +
 
 +
 
 +
[https://blog.csdn.net/lijiaocn/article/details/81865120 新型监控告警工具prometheus(普罗米修斯)的入门使用(附视频讲解)]
 +
 
 +
[https://www.lijiaocn.com/%E9%A1%B9%E7%9B%AE/2018/08/03/prometheus-usage.html#prometheus%E7%9A%84%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6 【视频】新型监控告警工具prometheus(普罗米修斯)入门使用(附视频讲解)]
 +
 
 +
[https://zhuanlan.zhihu.com/p/91215371 为什么说 Prometheus 是足以取代 Zabbix 的监控神器?]
 +
 
 +
[https://zhuanlan.zhihu.com/p/24811652 基于Prometheus的分布式在线服务监控实践]
  
根据NIST(NationalInstituteofStandardsandTechnology,美国国家标准与技术研究院)的权威定义,云计算的服务模式有SPI(即SaaS、PaaS和IaaS)这三个大类或层次。这是目前被业界最广 泛认同的划分。PaaS和IaaS源于SaaS理念。PaaS和IaaS可以直接通过SOA/Web Services向平台用户提供服务, 也可以作为SaaS模式的支撑平台间接向最终用户服务
+
==usage==
 +
[https://www.jianshu.com/p/03cf0fc9c746 Grafana单图表告警邮件&面板图(Dashboard)日报邮件]
 +
 
 +
[https://prometheus.io/docs/practices/rules/ Recording rules ]
 +
 
 +
https://github.com/prometheus/blackbox_exporter/blob/master/blackbox.yml
 +
 
 +
=grafana=
 +
<pre>
 +
#防火墙  grafana ng 在 10.3.10.10
 +
firewall-cmd  --permanent --add-rich-rule="rule family="ipv4" source address="10.3.10.10" port protocol="tcp" port="3000" accept "
 +
firewall-cmd --reload
  
假设你是一家超牛X的技术公司,根本不需要别人提供服务,你拥有基础设施、应用等等其它一切,你把它们分为三层:基础设施(infrastructure)、平台(platform)和软件(software),如下图:
+
</pre>
  
  
这其实就是云计算的三个分层,基础设施在最下端,平台在中间,软件在顶端,分别是分别是Infrastructure-as-a-Service(IaaS),Platform-as-a-Service(PaaS),Software-as-a-Service(SaaS),别的一些“软”的层可以在这些层上面添加。
+
[https://grafana.com/docs/grafana/latest/installation/docker/ grafana.com Run Grafana Docker image]
  
而你的公司什么都有,现在所处的状态叫本地部署(On-Premises),就像在自己家做pizza一样。几年前如果你想在办公室或者公司的网站上运行一些企业应用,你需要去买服务器,或者别的高昂的硬件来控制本地应用,让你的业务运行起来,这就叫本地部署。
+
[https://grafana.com/grafana/dashboards/8919 中文 Node Exporte for Prometheus Dashboard]
  
假如你家BOSS突然有一天想明白了,只是为了吃上pizza,为什么非要自己做呢?于是,准备考虑一家云服务供应商,这个云服务供应商能提供哪些服务呢?其所能提供的云服务也就是云计算的三个分层:IaaS、PaaS和SaaS,就像pizza店提供三种服务:买成品回家做、外卖和到披萨店吃。
+
usage  creat-->import --> id  8919
  
 +
Container
  
云也是分层的
 
  
  任何一个在互联网上提供其服务的公司都可以叫做云计算公司。其实云计算分几层的,分别是Infrastructure(基础设施)-as-a-Service,Platform(平台)-as-a-Service,Software(软件)-as-a-Service。基础设施在最下端,平台在中间,软件在顶端。别的一些“软”的层可以在这些层上面添加。
 
  
 +
https://grafana.com/grafana/dashboards/11174
  
 +
 +
docker-grafana/config.env  https://github.com/stefanwalther/docker-grafana/blob/master/config.env 
  
 IaaS: Infrastructure-as-a-Service(基础设施即服务)
+
==grafana 添加源和数据 ==
  
  第一层叫做IaaS,有时候也叫做Hardware-as-a-Service,几年前如果你想在办公室或者公司的网站上运行一些企业应用,你需要去买服务器,或者别的高昂的硬件来控制本地应用,让你的业务运行起来。
+
[https://www.bookstack.cn/read/prometheus-book/quickstart-use-grafana-create-dashboard.md 使用Grafana创建可视化Dashboard]
  但是现在有IaaS,你可以将硬件外包到别的地方去。IaaS公司会提供场外服务器,存储和网络硬件,你可以租用。节省了维护成本和办公场地,公司可以在任何时候利用这些硬件来运行其应用。
+
==grafana 添加用户 ==
  一些大的IaaS公司包括Amazon, Microsoft, VMWare, Rackspace和Red Hat.不过这些公司又都有自己的专长,比如Amazon和微软给你提供的不只是IaaS,他们还会将其计算能力出租给你来host你的网站。
+
<pre>
 +
1.Users-->  2.Invite -->
  
PaaS: Platform-as-a-Service(平台即服务)
+
3.进行邀请
 +
Email or Username:输入用户邮箱,建议先跟用户名保持相同,然后在后面在写邮箱,后面会说到,这样不会报错
 +
Name:输入用户名
 +
Role:配置用户权限(只读Viewer 编辑Editor 管理员Admin)
 +
Send invite email:勾选时,会将新用户的设置密码的链接发到邮箱
  
  第二层就是所谓的PaaS,某些时候也叫做中间件。你公司所有的开发都可以在这一层进行,节省了时间和资源。
+
点击创建之后回调到新用户设置密码
  PaaS公司在网上提供各种开发和分发应用的解决方案,比如虚拟服务器和操作系统。这节省了你在硬件上的费用,也让分散的工作室之间的合作变得更加容易。网页应用管理,应用设计,应用虚拟主机,存储,安全以及应用开发协作工具等。
 
  一些大的PaaS提供者有Google App Engine,Microsoft Azure,Force.com,Heroku,Engine Yard。最近兴起的公司有AppFog, Mendix 和 Standing Cloud
 
  
SaaS: Software-as-a-Service(软件即服务)
+
-->
  
  第三层也就是所谓SaaS。这一层是和你的生活每天接触的一层,大多是通过网页浏览器来接入。任何一个远程服务器上的应用都可以通过网络来运行,就是SaaS了。
+
4.创建好之后,点击Pending Invites
  你消费的服务完全是从网页如Netflix, MOG, Google Apps, Box.net, Dropbox或者苹果的iCloud那里进入这些分类。尽管这些网页服务是用作商务和娱乐或者两者都有,但这也算是云技术的一部分。
+
复制链接到浏览器的地址栏中访问(也可从邮件中收到链接)
  一些用作商务的SaaS应用包括Citrix的GoToMeeting,Cisco的WebEx,Salesforce的CRM,ADP,Workday和SuccessFactors。
+
进去之后是下面的界面,这里有个坑,复制的IP地址是localhost,我们这里改为自己搭建的IP地址,然后在Email填写邮箱地址,设置新用户的密码
 +
设置完成后,会直接以新用户身份登陆
  
Iaas和Paas之间的比较
 
  
 +
http://localhost:3000/invite/PAhyq4gzfA3ugRiw0PH2RC2vsIuSTa
  
IaaS的主要应用趋势
+
  -->
  
 
</pre>
 
</pre>
 +
 +
[https://blog.csdn.net/liuxiangyang_/article/details/86737103  grafana的用户及权限的配置]
 +
 +
[https://blog.csdn.net/GX_1_11_real/article/details/85119451  grafana的用户及权限的配置]
 +
 +
[https://blog.csdn.net/kozazyh/article/details/93759717?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-2.nonecase&depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-2.nonecase  grafana-利用Google OAuth2 身份验证]
 +
 +
==使用教程==
 +
[https://yuerblog.cc/2019/01/04/grafana-usage/ grafana配置与简单使用]
 +
 +
[https://blog.csdn.net/bbwangj/article/details/81109615  Grafana使用教程]
 +
 +
[https://blog.csdn.net/Sagitarioo/article/details/102805852?depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromBaidu-2&utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromBaidu-2  grafana数据可视化-使用教程]
 +
 +
[https://www.cnblogs.com/xkus/p/7462742.html  grafana快速入门 ]
 +
 +
[https://blog.csdn.net/u012062455/article/details/79214700  grafana使用教程之基本概念(basic concepts)]
 +
 +
[https://blog.csdn.net/weixin_42674978/article/details/102681969  Grafana从无到有的一个相当粗略的资料总结]
 +
 +
 +
[https://blog.csdn.net/Sagitarioo/article/details/102805852?depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromBaidu-2&utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromBaidu-2  grafana数据可视化-使用教程]
 +
 +
[https://ken.io/note/grafana-quickstart-influxdb-datasource-graph Grafana快速入门:InfluxDB数据源以及曲线图表仪表盘配置]
 +
 +
 +
[https://www.cnblogs.com/fatyao/p/11192234.html Grafana报警]
 +
 +
 +
apached conf
 +
<pre>
 +
##/etc/httpd/conf.d/gf.conf
 +
 +
 +
<VirtualHost *:80>
 +
      ServerName gf.linuxsa.org
 +
      ServerAlias gf.linuxsa.org
 +
   
 +
      ProxyRequests off
 +
   
 +
      <Proxy *>
 +
        Order deny,allow
 +
        Allow from all
 +
      </Proxy>
 +
   
 +
      <Location />
 +
        ProxyPass http://localhost:3000/
 +
        ProxyPassReverse http://localhost:3000/
 +
      </Location>
 +
    </VirtualHost>
 +
 +
</pre>
 +
 +
=vm监控[[Node-exporter]]=
 +
可以如上的  node
 +
[[Node-exporter]]
 +
 +
=Blackbox=
 +
 +
[[Blackbox exporter]]
 +
 +
=pushgateway=
 +
 +
[[pushgateway]]
 +
 +
[https://www.cnblogs.com/xiao987334176/p/9933963.html  基于Prometheus的Pushgateway实战 ]
 +
 +
https://songjiayang.gitbooks.io/prometheus/content/pushgateway/how.html
 +
 +
=[[Process-exporter]]=
 +
 +
=应用监控=
 +
==redis==
 +
[[prometheus监控Redis集群]]
 +
 +
[https://blog.csdn.net/weixin_43832846/article/details/90024274  pika主备部署(redis-sentinel)+监控(prometheus+grafana)]
 +
 +
[https://blog.csdn.net/weixin_34289744/article/details/92725774?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-16.nonecase&depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-16.nonecase  Prometheus监控 Redis , redis-cli_exporter]
 +
 +
==监控MQ==
 +
[https://www.rabbitmq.com/prometheus.html  Monitoring with Prometheus & Grafana ]
 +
 +
==监控ES==
 +
https://github.com/slok/ecs-exporter
 +
==docker==
 +
[https://blog.csdn.net/palet/article/details/82889493?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-7.nonecase&depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-7.nonecase  Prometheus+grafana监控:cAdvisor输出的容器内存相关的指标的解读]
 +
 +
== mysql==
 +
[https://blog.csdn.net/qq_25934401/article/details/82594478  prometheus 监控之 mysql 篇(含mysql报警规则)]
 +
 +
[https://jiajunhuang.com/articles/2018_12_16-prometheus_mysqld_exporter.md.html Prometheus MySQL Exporter源码阅读与分析]
 +
 +
[https://www.jianshu.com/p/27b979554ef8 python + promethues 监控mysql]
 +
 +
==Spring boot==
 +
https://www.bookstack.cn/read/prometheus_practice/application-spring.md
 +
 +
 +
[https://blog.csdn.net/liangcha007/article/details/86699013#7.%E5%85%B3%E4%BA%8Epushgateway  Prometheus基于java开发exporter样例以及pushgateway的应用]
 +
 +
=告警=
 +
 +
[[Alertmanager]]
 +
 +
==telegram==
 +
通过 prome or grafana ?
 +
 +
 +
[https://blog.csdn.net/weixin_34242331/article/details/91875514  基于prometheus + grafana + mysql + Telegram 监控告警]
 +
https://my.oschina.net/54188zz/blog/3030618
 +
 +
=教程=
 +
[https://www.cnblogs.com/zhaojiedi1992/p/zhaojiedi_liunx_60_prometheus_config.html  prometheus学习系列五: Prometheus配置文件 ]
 +
 
=see also=
 
=see also=
  
https://blog.csdn.net/m0_37284701/article/details/56833176
+
[https://www.jianshu.com/p/93412a925da2 规划 Prometheus 的存储用量]
 +
 
 +
[https://blog.csdn.net/lemon89/article/details/104088184 深入理解监控系统——Prometheus核心特点]
 +
 
 +
[https://blog.csdn.net/qq_21816375/article/details/80462445?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-12.nonecase&depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-12.nonecase  prometheus部署node,server以及域名加告警]
 +
 
 +
[https://www.cnblogs.com/chenqionghe/p/10494868.html 从零搭建Prometheus监控报警系统]
 +
 
 +
[https://www.jianshu.com/p/1f05476ebcee 使用prometheus自定义监控]
 +
 
 +
[https://zhuanlan.zhihu.com/p/91215371 为什么说 Prometheus 是足以取代 Zabbix 的监控神器?]
  
[https://www.cnblogs.com/imlucky/p/3567480.html 云计算的三层SPI模型]
+
[https://blog.51cto.com/wzlinux/2487300 prometheus 监控概述(一)]
  
[https://blog.csdn.net/mal327/article/details/6920312 云计算的三层SPI模型]
 
  
[https://blog.csdn.net/broadview2006/article/details/6156180 云计算的SPI服务模型]
 
  
[[category:ops]]
+
[[category:ops]] [[category:container]] [[category:prom]]

2020年9月25日 (五) 06:22的版本

==


book

Prometheus操作指南

进阶

以后全改成自己 docker-compose build

prometheus 监控概述(一)有常用监控警告

PromQL 内置函数(三)


prometheus python 库编写自定义指标的方法(完整代码)

ins on docker-composer

https://gitee.com/atompi/PrometheusStackDockerCompose

安全

 node exporter 添加防火墙

curl -Lo /etc/yum.repos.d/_copr_ibotty-prometheus-exporters.repo https://copr.fedorainfracloud.org/coprs/ibotty/prometheus-exporters/repo/epel-7/ibotty-prometheus-exporters-epel-7.repo
# yum install node_exporter

prometheus

Nginx用户密码认证配置 Basic HTTP authentication

不错的书 https://yunlzheng.gitbook.io/prometheus-book/



新型监控告警工具prometheus(普罗米修斯)的入门使用(附视频讲解)

【视频】新型监控告警工具prometheus(普罗米修斯)入门使用(附视频讲解)

为什么说 Prometheus 是足以取代 Zabbix 的监控神器?

基于Prometheus的分布式在线服务监控实践

usage

Grafana单图表告警邮件&面板图(Dashboard)日报邮件

Recording rules

https://github.com/prometheus/blackbox_exporter/blob/master/blackbox.yml

grafana

#防火墙   grafana ng 在 10.3.10.10
 firewall-cmd   --permanent --add-rich-rule="rule family="ipv4" source address="10.3.10.10" port protocol="tcp" port="3000" accept "
firewall-cmd --reload


grafana.com Run Grafana Docker image

中文 Node Exporte for Prometheus Dashboard

usage creat-->import --> id 8919

Container


https://grafana.com/grafana/dashboards/11174


docker-grafana/config.env  https://github.com/stefanwalther/docker-grafana/blob/master/config.env  

grafana 添加源和数据

使用Grafana创建可视化Dashboard

grafana 添加用户

1.Users-->  2.Invite --> 

3.进行邀请
Email or Username:输入用户邮箱,建议先跟用户名保持相同,然后在后面在写邮箱,后面会说到,这样不会报错
Name:输入用户名
Role:配置用户权限(只读Viewer 编辑Editor 管理员Admin)
Send invite email:勾选时,会将新用户的设置密码的链接发到邮箱

点击创建之后回调到新用户设置密码

 -->

4.创建好之后,点击Pending Invites
复制链接到浏览器的地址栏中访问(也可从邮件中收到链接)
进去之后是下面的界面,这里有个坑,复制的IP地址是localhost,我们这里改为自己搭建的IP地址,然后在Email填写邮箱地址,设置新用户的密码
设置完成后,会直接以新用户身份登陆


http://localhost:3000/invite/PAhyq4gzfA3ugRiw0PH2RC2vsIuSTa

  -->

grafana的用户及权限的配置

grafana的用户及权限的配置

grafana-利用Google OAuth2 身份验证

使用教程

grafana配置与简单使用

Grafana使用教程

grafana数据可视化-使用教程

grafana快速入门

grafana使用教程之基本概念(basic concepts)

Grafana从无到有的一个相当粗略的资料总结


grafana数据可视化-使用教程

Grafana快速入门:InfluxDB数据源以及曲线图表仪表盘配置


Grafana报警


apached conf
##/etc/httpd/conf.d/gf.conf


<VirtualHost *:80>
      ServerName gf.linuxsa.org
      ServerAlias gf.linuxsa.org
     
      ProxyRequests off
     
      <Proxy *>
        Order deny,allow
        Allow from all
      </Proxy>
     
      <Location />
        ProxyPass http://localhost:3000/
        ProxyPassReverse http://localhost:3000/
      </Location>
    </VirtualHost>

vm监控Node-exporter

可以如上的 node Node-exporter

Blackbox

Blackbox exporter

pushgateway

pushgateway

基于Prometheus的Pushgateway实战

https://songjiayang.gitbooks.io/prometheus/content/pushgateway/how.html

Process-exporter

应用监控

redis

prometheus监控Redis集群

pika主备部署(redis-sentinel)+监控(prometheus+grafana)

Prometheus监控 Redis , redis-cli_exporter

监控MQ

Monitoring with Prometheus & Grafana

监控ES

https://github.com/slok/ecs-exporter

docker

Prometheus+grafana监控:cAdvisor输出的容器内存相关的指标的解读

mysql

prometheus 监控之 mysql 篇(含mysql报警规则)

Prometheus MySQL Exporter源码阅读与分析

python + promethues 监控mysql

Spring boot

https://www.bookstack.cn/read/prometheus_practice/application-spring.md


Prometheus基于java开发exporter样例以及pushgateway的应用

告警

Alertmanager

telegram

通过 prome or grafana ?


基于prometheus + grafana + mysql + Telegram 监控告警 https://my.oschina.net/54188zz/blog/3030618

教程

prometheus学习系列五: Prometheus配置文件

see also

规划 Prometheus 的存储用量

深入理解监控系统——Prometheus核心特点

prometheus部署node,server以及域名加告警

从零搭建Prometheus监控报警系统

使用prometheus自定义监控

为什么说 Prometheus 是足以取代 Zabbix 的监控神器?

prometheus 监控概述(一)