我们正在尝试替换prometheus.yaml
in,/etc/metrics/conf
因为它包含较旧的规则。我们尝试复制新的规则文件:
RUN mkdir -p /etc/metrics/conf
COPY conf/prometheus.yaml /etc/metrics/conf/prometheus.yaml
但是规则没有被采纳,prometheus 仍然忽略了新的指标。
我们正在尝试替换prometheus.yaml
in,/etc/metrics/conf
因为它包含较旧的规则。我们尝试复制新的规则文件:
RUN mkdir -p /etc/metrics/conf
COPY conf/prometheus.yaml /etc/metrics/conf/prometheus.yaml
但是规则没有被采纳,prometheus 仍然忽略了新的指标。
可悲的事实是,实际上文件夹和文件已经在那里(看起来像是指向/etc/metrics/conf/..data/prometheus.yaml
位置的符号链接)。
我们不得不解决它
将文件复制到新位置
复制 conf/prometheus.yaml /etc/metrics/conf2/prometheus.yaml
将 configFile 参数添加到 helm 图表:
配置文件:“/etc/metrics/conf2/prometheus.yaml”
这会导致传递给 jmx-exporter 的 javaagent 的属性使用这个新prometheus.yaml
位置