Rancher1.6 部署prometheus
一、rancher基础配置
镜像:prom/prometheus:latest
映射端口:9090:9090
服务连接:
blackbox-exporter
cadvisor
node-exporter
挂载卷:
/home/work/prometheus:/etc/prometheus/
调度:
monitor=true
二、配置文件挂载
需要修改监听机器IP:
global: scrape_interval: 15s evaluation_interval: 15s external_labels: monitor: 'exporter-metrics'alerting: alertmanagers: - static_configs: - targets: ["alertmanager:9093"]# Settings related to the remote write feature.remote_write:remote_read:scrape_configs:- job_name: 'HostsMetrics' dns_sd_configs: - names: - node-exporter refresh_interval: 15s type: A port: 9100- job_name: 'RancherServerMetrics' dns_sd_configs: - names: - cadvisor refresh_interval: 15s type: A port: 8080- job_name: 'RancherApi' dns_sd_configs: - names: - 'prometheus-rancher-exporter' refresh_interval: 15s type: A port: 9173- job_name: 'Prometheus' static_configs: - targets: - '127.0.0.1:9090'- job_name: 'ng_02blackbox' metrics_path: /probe params: module: [http_2xx] # Look for a HTTP 200 response. static_configs: - targets: - http://www.baidu.co # Target to probe with http. - https://www.baidu.co # Target to probe with https. relabel_configs: - source_labels: [__address__] target_label: __param_target - source_labels: [__param_target] target_label: instance - target_label: __address__ replacement: 10.116.1.157:9115 # The blackbox exporter's real hostname:port.- job_name: 'ng_01blackbox' metrics_path: /probe params: module: [http_2xx] # Look for a HTTP 200 response. static_configs: - targets: - http://www.baidu.co # Target to probe with http. - https://www.baidu.co # Target to probe with https. relabel_configs: - source_labels: [__address__] target_label: __param_target - source_labels: [__param_target] target_label: instance - target_label: __address__ replacement: 10.116.1.155:9115 # The blackbox exporter's real hostname:port.- job_name: 'uc-upstream' metrics_path: /probe params: module: [http_2xx] # Look for a HTTP 200 response. static_configs: - targets: - http://10.116.1.157:2500/uc/_monitor - http://10.116.1.155:2500/uc/_monitor relabel_configs: - source_labels: [__address__] target_label: __param_target - source_labels: [__param_target] target_label: instance - target_label: __address__ replacement: 10.116.1.155:9115 # The blackbox exporter's real hostname:port.- job_name: 'ng_02port_status' metrics_path: /probe params: module: [tcp_connect] static_configs: - targets: ['127.0.0.1:443','127.0.0.1:80','10.116.1.155:2500','10.116.1.157:2500','10.116.1.155:3100','10.116.1.157:3100','10.116.1.157:4080','10.116.1.155:4090','10.116.1.155:4410','10.116.1.155:1101','10.116.1.157:1101'] labels: instance: 'port_status' group: 'tcp' relabel_configs: - source_labels: [__address__] target_label: __param_target - target_label: __address__ replacement: 10.116.1.157:9115- job_name: 'ng_01port_status' metrics_path: /probe params: module: [tcp_connect] static_configs: - targets: ['127.0.0.1:443','127.0.0.1:80','10.116.1.155:2500','10.116.1.157:2500','10.116.1.155:3100','10.116.1.157:3100','10.116.1.157:4080','10.116.1.155:4090','10.116.1.155:4410','10.116.1.155:1101','10.116.1.157:1101'] labels: instance: 'port_status' group: 'tcp' relabel_configs: - source_labels: [__address__] target_label: __param_target - target_label: __address__ replacement: 10.116.1.155:9115- job_name: 'kafka_exporter' static_configs: - targets: ['10.116.1.156:9308']- job_name: 'jmx_exporter' static_configs: - targets: ['10.116.1.156:9309'] |
Rancher1.6 部署prometheus的更多相关文章
- kubernetes之监控Operator部署Prometheus(三)
第一章和第二章中我们配置Prometheus的成本非常高,而且也非常麻烦.但是我们要考虑Prometheus.AlertManager 这些组件服务本身的高可用的话,成本就更高了,当然我们也完全可以用 ...
- k8s部署prometheus
https://www.kancloud.cn/huyipow/prometheus/527092 https://songjiayang.gitbooks.io/prometheus/content ...
- 【集群监控】Docker上部署Prometheus+Alertmanager+Grafana实现集群监控
Docker部署 下载 sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.re ...
- 基于k8s集群部署prometheus监控ingress nginx
目录 基于k8s集群部署prometheus监控ingress nginx 1.背景和环境概述 2.修改prometheus配置 3.检查是否生效 4.配置grafana图形 基于k8s集群部署pro ...
- 基于k8s集群部署prometheus监控etcd
目录 基于k8s集群部署prometheus监控etcd 1.背景和环境概述 2.修改prometheus配置 3.检查是否生效 4.配置grafana图形 基于k8s集群部署prometheus监控 ...
- k8s之自定义指标API部署prometheus
1.自定义指标-prometheus node_exporter是agent;PromQL相当于sql语句来查询数据; k8s-prometheus-adapter:prometheus是不能直接解析 ...
- kubernetes1.11.1 部署prometheus
部署前提:已经安装好了kubernetes的集群,版本是1.11.1,是用kubeadm部署的. 2台虚拟机:master:172.17.1.36 node1:172.17.1.40 pro ...
- k8b部署prometheus+grafana
来源: https://juejin.im/post/5c36054251882525a50bbdf0 https://github.com/redhatxl/k8s-prometheus-grafa ...
- 在Kubernetes下部署Prometheus
使用ConfigMaps管理应用配置 当使用Deployment管理和部署应用程序时,用户可以方便了对应用进行扩容或者缩容,从而产生多个Pod实例.为了 能够统一管理这些Pod的配置信息,在Kuber ...
随机推荐
- 别让HR再质问我:我费劲招的人,你用缓存问废了,不能简单点?
概念 缓存穿透 在高并发下,查询一个不存在的值时,缓存不会被命中,导致大量请求直接落到数据库上,如活动系统里面查询一个不存在的活动. 缓存击穿 在高并发下,对一个特定的值进行查询,但是这个时候缓存正好 ...
- protobuf安装流程
protobuf安装流程 环境 平台 Ubuntu16.04 依赖 autoconf automake libtool curl make g++ 安装流程 在Ubuntu / Debian上,您 ...
- 658.找到K个最接近的元素
2020-03-10 找到 K 个最接近的元素 给定一个排序好的数组,两个整数 k 和 x,从数组中找到最靠近 x(两数之 差最小)的 k 个数.返回的结果必须要是按升序排好的.如果有两个数与 x 的 ...
- @hdu - 5822@ color
目录 @description@ @solution@ @accepted code@ @details@ @description@ 给定一个每个点出度都为 1 的有向连通图以及 m 种颜色.求本质 ...
- 容器技术之Docker资源限制
上一篇我们聊到了docker容器的单机编排工具docker-compose的简单使用,回顾请参考https://www.cnblogs.com/qiuhom-1874/p/13121678.html: ...
- 增值税发票税控开票软件助手Excel、ERP、SAP导入开票接口进行批量开票操作手册
写这遍文章的目的是方便以后个人使用,做个笔记记录. 首先我来说一下它是做什么用的,它的主要作用是把用户的开票数据,Excel数据.ERP 系统.SAP导入到增值税发票税控开票软件中,可用航信盘.百旺盘 ...
- Android学习笔记菜单资源文件
创建菜单资源 menu_one.xml <?xml version="1.0" encoding="utf-8"?> <menu xmlns: ...
- Ngnix 配置文件快速入门
转自https://www.cnblogs.com/knowledgesea/p/5175711.html 其实也没什么好说的,我想大部分人也不会在意nginx的实现原理啥的.服务器要部署的时候,把n ...
- Asp.Net 五大对象及作用
Connection(连接对象):与数据源建立连接. DataAdapter(适配器对象):对数据源执行操作并返回结果,在DataSet与数据源之间建立通信,将数据源中的数据写入DataSet中,或根 ...
- Redis安装过程jemalloc/jemalloc.h报错
问题: [root@localhost redis-3.0.0]# make cd src && make all make[1]: Entering directory `/data ...