随笔分类 - prometheus
摘要:
prometheus 存储系统 Prometheus 有着非常高效的时间序列数据存储方法,每个采样数据仅仅占用3.5 byte 左右空间,上百万条时间序列,30秒间隔,保留60天,大概200多G空间。 默认情况下,prometheus 将采集到的数据存储在本地的 TSDB 数据库中,路径默认为 pr
阅读全文

摘要:
Prometheus-Server 联邦集群环境: prometheus 主节点 prometheus-1 联邦节点1 prometheus-2 联邦节点2 node1 联邦节点1的目标采集服务器 node2 联邦节点2的目标采集服务器 安装prometheus-server(主节点与联邦节点均部署
阅读全文

摘要:
Alertmanager prometheus-server 触发一条告警的过程: prometheus >触发阈值 >超出持续时间 >alertmanager >分组|抑制|静默 >媒体类型 >邮件|钉钉|微信等。 分组(group): 将类似性质的警报合并为单个通知,比如网络通知、主机通知、服务
阅读全文

摘要:
blackbox_exporter 监控组件 blackbox_exporter 是 Prometheus 官方提供的一个 exporter,可以监控 HTTP、 HTTPS,、DNS、 TCP 、ICMP 等目标实例,从而实现对被监控节点进行监控 和数据采集。promethes调用blackbox
阅读全文

摘要:
服务监控 可以根据prometheus官网找到对应服务的exporter https://prometheus.io/docs/instrumenting/exporters/ 监控tomcat容器 基于第三方 exporter 实现对目的服务的监控 github项目地址:https://githu
阅读全文

摘要:
kube-state-metrics 组件介绍 github项目地址:https://github.com/kubernetes/kube-state-metrics Kube-state-metrics: 通过监听 API Server 生成有关资源对象的状态指标,比如 Deployment、No
阅读全文

摘要:
安装consul consul官网:https://www.consul.io/ Consul 是分布式 k/v 数据存储集群,目前常用于服务的服务注册和发现。 官网下载 下载链接1 https://www.consul.io/downloads 下载链接2 https://releases.has
阅读全文

摘要:k8s外部实现pod发现 使用外部网络单独部署的prometheus-server进行服务发现k8s中的资源 在 namespace monitoring 创建服务发现账号 prometheus 并授权。 k8s创建sa用户并授权集群权限 root@master1:~/yaml# cat outsi
阅读全文
摘要:服务发现的类型介绍 prometheus默认是采用pull方式拉取监控数据的,也就是定时去目标主机上抓取metrics数据,每一个被抓取的目标需要暴露一个HTTP接口,prometheus通过这个暴露的接口就可以获取到相应的指标数据,这种方式需要由目标服务决定采集的目标有哪些,通过配置在scrape
阅读全文
摘要:安装grafana grafana介绍 grafana是⼀个可视化组件,⽤于接收客户端浏览器的请求并连接到prometheus查询数据,最后经过渲染并在浏览器进⾏体系化显示,需要注意的是,grafana查询数据类似于abbix⼀样需要自定义模板,模板可以手动制作也可以导入已有模板。 grafana安
阅读全文
摘要:收集node-exporter指标数据 修改prometheus-server配置文件,在scrape_configs配置项下,添加新job root@prometheus:~\ vim /usr/local/prometheus/prometheus.yml ... - job_name: "k8
阅读全文
摘要:
Operator部署 Operator部署器是基于已经编写好的yaml文件,可以将prometheus server、alertmanager、grafana、nodeexporter等组件⼀键批量部署在k8s集群当中。 github项目地址: https://github.com/promethe
阅读全文
