我试图使用node_exporter sidecar部署prometheus,但是当我在sidecar node_exporter容器上使用volumeMounts时,它给了我“多附加错误”,不能挂载或没有绑定。我想使用节点导出属于我所有的豆荚/应用程序,以便有使用磁盘度量,在openshift中,我们没有任何pvc磁盘使用监控指标,而且非常烦人。
my yaml.config:
containers:
- args:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--web.enable-lifecycle'
command:
- /bin/prometheus
image: ${DOCKER_REPOSITORY}/prom/prometheus:v2.0.0
imagePullPolicy: IfNotPresent
name: prometheus
ports:
- containerPort: 9090
protocol: TCP
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /prometheus
name: prometheus-data
- mountPath: /etc/prometheus
name: prometheus-configmap
image: quay.io/prometheus/node-exporter
imagePullPolicy: IfNotPresent
name: node-exporter-sidecar
ports:
- containerPort: 9100
protocol: TCP
volumeMounts:
- mountPath: /prometheus
name: prometheus-data
- kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: prometheus-ls-data
spec:
accessModes: [ "ReadWriteOnce" ]
resources:
requests:
storage: "${PV_SIZE}"
storageClassName: "cinder-performant"发布于 2022-04-21 13:24:59
节点导出器作为默认openshift监视堆栈的一部分部署,其生命周期由集群监视操作员管理。它作为一个守护进程部署,并在每个节点上作为pod运行以提取其指标。
是否在集群中安装或部署了默认prometheus监视堆栈,如果没有,只需部署默认堆栈,节点导出程序将作为其中的一部分安装。
发布于 2022-04-21 21:58:21
下面,Prometheus作为默认openshift监视堆栈(作为Kubelet )的一部分公开。您可以使用它来计算pv的使用。
kubelet_volume_stats_available_bytes kubelet_volume_stats_capacity_bytes kubelet_volume_stats_inodes kubelet_volume_stats_inodes_used
在prometheus实例中,您看不到上述指标吗?
发布于 2022-04-23 08:35:12
在openshift中,3.9卷度量由prometheus公开如下

所以搜索这些指标。
https://stackoverflow.com/questions/71952140
复制相似问题