目录

给绿联NAS部署prometheus

概述

通过 Kubernetes 的方式部署 kube-prometheus-stack,一次性可以安装好包括 Node Exporter,Grafana,Prometheus,AlertManager 等组件,整套下来实在太麻烦了,因此个人还是考虑在绿联 NAS 上部署 Prometheus。

创建容器

可以按照下面的方式创建容器。

/%E7%BB%99%E7%BB%BF%E8%81%94nas%E9%83%A8%E7%BD%B2prometheus/img.png

Prometheus 的容器最核心还是 Prometheus 采集到的指标需要放在 NAS 上,这样就不会有单台机器的存储压力了,毕竟 NAS 都是 TB 级别的容量。

/%E7%BB%99%E7%BB%BF%E8%81%94nas%E9%83%A8%E7%BD%B2prometheus/img_1.png

访问Prometheus

下面是通过绿联 NAS 的 Docker 管理平台创建成功的 Prometheus 服务。

/%E7%BB%99%E7%BB%BF%E8%81%94nas%E9%83%A8%E7%BD%B2prometheus/img_2.png

然后就是 Prometheus 的配置文件,主要是要部署相关指标的 exporter,然后才能在配置文件中按照不同的 job 分类配置。

/%E7%BB%99%E7%BB%BF%E8%81%94nas%E9%83%A8%E7%BD%B2prometheus/img_3.png