kubernetes 安装 Prometheus + Grafana
kubernetes 安装 Prometheus + Grafana
kubernetes install Prometheus + Grafana
官网
Official website
https://prometheus.io/GitHub
GitHub
https://github.com/coreos/kube-prometheus组件说明
Component description
MetricServer:是kubernetes集群资源使用情况的聚合器,收集数据给kubernetes集群内使用,如 kubectl,hpa,scheduler等。
PrometheusOperator:是一个系统监测和警报工具箱,用来存储监控数据。
NodeExporter:用于各node的关键度量指标状态数据。
KubeStateMetrics:收集kubernetes集群内资源对象数 据,制定告警规则。
Prometheus:采用pull方式收集apiserver,scheduler,controller-manager,kubelet组件数 据,通过http协议传输。
Grafana:是可视化数据统计和监控平台。
MetricServer: It is an aggregator of the resource usage of the kubernetes cluster, collecting data for use in the kubernetes cluster, such as kubectl, hpa, scheduler, etc.
PrometheusOperator: is a system monitoring and alerting toolbox used to store monitoring data.
NodeExporter: Used for the key metric status data of each node.
KubeStateMetrics: Collect resource object data in the kubernetes cluster and formulate alarm rules.
Prometheus: collect data from apiserver, scheduler, controller-manager, and kubelet components in a pull mode, and transmit it through the http protocol.
Grafana: It is a platform for visual data statistics and monitoring.
安装
Install
配置Google上网环境下的docker,docker会去外网进行下载部分镜像
Configure docker in Google's Internet environment, docker will go to the external network to download part of the image
dockerd代理的修改比较特殊,它实际上是改systemd的配置,因此需要重载systemd并重启dockerd才能生效。
The modification of the dockerd agent is quite special. It actually changes the configuration of systemd, so systemd needs to be reloaded and dockerd restarted to take effect.
下载
download
修改 grafana-service.yaml 文件,使用 nodepode 方式访问 grafana:
Modify the grafana-service.yaml file and use nodepode to access grafana:
修改 prometheus-service.yaml,改为 nodepode:
Modify prometheus-service.yaml to nodepode:
修改 alertmanager-service.yaml,改为 nodepode
Modify alertmanager-service.yaml to nodepode
创建名称空间和CRD
Create namespace and CRD
等待资源可用后,安装
After waiting for resources to be available, install
访问 Prometheus
Visit Prometheus
http://192.168.1.10:31200/targets
访问 Grafana
Visit Grafana
http://192.168.1.10:31100/
访问报警平台 AlertManager
Visit the alert platform AlertManager
http://192.168.1.10:31400/#/status
关于
https://www.oiox.cn/
https://www.oiox.cn/index.php/start-page.html
CSDN、GitHub、51CTO、知乎、开源中国、思否、掘金、简书、华为云、阿里云、腾讯云、哔哩哔哩、今日头条、新浪微博、个人博客
全网可搜《小陈运维》
文章主要发布于微信公众号
最后更新于