|NO.Z.00294|——————————|CloudNative|——|KuberNetes&运维.V15|——|监控.v01|Prometheus概述|3台Server|

一、Prometheus介绍
### --- Prometheus简介

~~~     在容器中使用的监控是Prometheus,容器的监控更复杂,更具有动态性,它的动态性更强。
~~~     使用传统的监控方式,可能不是很适合;所以就衍生了专属监控容器的监控工具
~~~     Prometheus监控容器是做的非常好的监控工具
~~~     Prometheus本身是一个时间序列数据库,用来采集数据存到本地的。
~~~     然后把这个数据展示给Prometheus的UI
~~~     Prometheus可以基于demon进程去安装,也可以通过二进制的方式安装;
~~~     也可以基于容器去安装
~~~     此环境基于operator去安装;通过operator安装还是比较简单的,自定义监控比较简单
二、在生产环境中怎么安装Prometheus
### --- 在生产环境中怎么安装Prometheus

~~~     建议是基于容器去安装
~~~     最好的方式是:给Prometheus找一些专用的节点,
~~~     比如说起3个Prometheus的pod,就找3个Prometheus的专用节点,专门用来跑Prometheus的服务
~~~     Prometheus会把采集的数据存储到本地,也可以存储到远程的时间序列数据库
~~~     存储到本地的话,假设启动了3个副本的Prometheus,就会存储3份数据,
~~~     若是这3个Prometheus连接的是远程的时间序列数据库的话,
~~~     就是存储一个数据;就需要多维护一个时间序列数据库
~~~     大部分的安装方式都是采用本地的安装方式,本地的读写的速度是非常快的,
~~~     若是采用远程的话连接过程可能会有一定的损耗。
三、Prometheus的源码地址:
### --- prometheus源码地址:

~~~~        ——> https://github.com/prometheus-operator/prometheus-operator
~~~~        通过operator衍生出来kube-prometheus
### --- kube-prometheus源码地址:

~~~~    ——> https://github.com/prometheus-operator/kube-prometheus
### --- Prometheus和Prometheus-operator的区别是什么

~~~~    # prometheus-operator:安装完之后就只有一个operator,自定义了一些CRD,
~~~     需要手动的定义去创建各种监控
~~~~    # kube-prometheus:包含了很多已有的监控,有很多自定义的监控,
~~~     基本的监控不需要我们手动去添加
### --- kube-prometheus:包含的监控模板

~~~~    Prometheus Operator:                            Prometheus 的operator
~~~~    Highly available Prometheus:                    高可用的Prometheus
~~~~    Highly available Alertmanager:                   高可用的Alertmanager;告警用的
~~~~    Prometheus node-exporter:                       node的节点监控
~~~~    Prometheus Adapter for Kubernetes Metrics APIs: adapter
~~~~    kube-state-metrics:                             这个组件也安装好了,监控每个deployment起了多少个副本,每个容器状态是什么样的,都是它来提供的
~~~~    GrafanaL:                                       用来展示数据的

 
 
 
 
 
 
 
 
 

Walter Savage Landor:strove with none,for none was worth my strife.Nature I loved and, next to Nature, Art:I warm'd both hands before the fire of life.It sinks, and I am ready to depart
                                                                                                                                                   ——W.S.Landor

 

 

posted on   yanqi_vip  阅读(20)  评论(0编辑  收藏  举报

相关博文:
阅读排行:
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 记一次.NET内存居高不下排查解决与启示
· DeepSeek 开源周回顾「GitHub 热点速览」
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

导航

统计

点击右上角即可分享
微信分享提示